LCOV - code coverage report
Current view: top level - tests/harness - backendmanager_remoteprog.h (source / functions) Hit Total Coverage
Test: Test Coverage for xapian-core c2b6f1024d3a Lines: 3 3 100.0 %
Date: 2019-05-16 09:13:18 Functions: 2 2 100.0 %
Branches: 2 4 50.0 %

           Branch data     Line data    Source code
       1                 :            : /** @file backendmanager_remoteprog.h
       2                 :            :  * @brief BackendManager subclass for remoteprog databases.
       3                 :            :  */
       4                 :            : /* Copyright (C) 2007,2009,2011 Olly Betts
       5                 :            :  * Copyright (C) 2008 Lemur Consulting Ltd
       6                 :            :  *
       7                 :            :  * This program is free software; you can redistribute it and/or
       8                 :            :  * modify it under the terms of the GNU General Public License as
       9                 :            :  * published by the Free Software Foundation; either version 2 of the
      10                 :            :  * License, or (at your option) any later version.
      11                 :            :  *
      12                 :            :  * This program is distributed in the hope that it will be useful,
      13                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      14                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      15                 :            :  * GNU General Public License for more details.
      16                 :            :  *
      17                 :            :  * You should have received a copy of the GNU General Public License
      18                 :            :  * along with this program; if not, write to the Free Software
      19                 :            :  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
      20                 :            :  */
      21                 :            : 
      22                 :            : #ifndef XAPIAN_INCLUDED_BACKENDMANAGER_REMOTEPROG_H
      23                 :            : #define XAPIAN_INCLUDED_BACKENDMANAGER_REMOTEPROG_H
      24                 :            : 
      25                 :            : #include "backendmanager.h"
      26                 :            : #include "backendmanager_remote.h"
      27                 :            : 
      28                 :            : #include <string>
      29                 :            : 
      30                 :            : #include <xapian/types.h>
      31                 :            : #include <xapian/postingiterator.h>
      32                 :            : 
      33                 :            : /// BackendManager subclass for remoteprog databases.
      34         [ -  + ]:          2 : class BackendManagerRemoteProg : public BackendManagerRemote {
      35                 :            :     /// Don't allow assignment.
      36                 :            :     void operator=(const BackendManagerRemoteProg &);
      37                 :            : 
      38                 :            :     /// Don't allow copying.
      39                 :            :     BackendManagerRemoteProg(const BackendManagerRemoteProg &);
      40                 :            : 
      41                 :            :     /// The path of the last writable database used.
      42                 :            :     std::string last_wdb_name;
      43                 :            : 
      44                 :            :     /// Create a Xapian::Database object indexing multiple files.
      45                 :            :     Xapian::Database do_get_database(const std::vector<std::string> & files);
      46                 :            : 
      47                 :            :   public:
      48                 :          1 :     explicit BackendManagerRemoteProg(BackendManager* sub_manager_)
      49         [ +  - ]:          1 :         : BackendManagerRemote(sub_manager_) { }
      50                 :            : 
      51                 :            :     /// Return a string representing the current database type.
      52                 :            :     std::string get_dbtype() const;
      53                 :            : 
      54                 :            :     /// Create a RemoteProg Xapian::WritableDatabase object indexing a single file.
      55                 :            :     Xapian::WritableDatabase get_writable_database(const std::string & name,
      56                 :            :                                                    const std::string & file);
      57                 :            : 
      58                 :            :     /// Create a RemoteProg Xapian::Database with the specified timeout.
      59                 :            :     Xapian::Database get_remote_database(const std::vector<std::string> & files,
      60                 :            :                                          unsigned int timeout);
      61                 :            : 
      62                 :            :     /// Create a Database object for the last opened WritableDatabase.
      63                 :            :     Xapian::Database get_writable_database_as_database();
      64                 :            : 
      65                 :            :     /// Create a WritableDatabase object for the last opened WritableDatabase.
      66                 :            :     Xapian::WritableDatabase get_writable_database_again();
      67                 :            : };
      68                 :            : 
      69                 :            : #endif // XAPIAN_INCLUDED_BACKENDMANAGER_REMOTEPROG_H

Generated by: LCOV version 1.11