LCOV - code coverage report
Current view: top level - harness - backendmanager_remote.h (source / functions) Hit Total Coverage
Test: Test Coverage for xapian-core r Lines: 1 1 100.0 %
Date: 2011-08-21 Functions: 1 3 33.3 %
Branches: 1 6 16.7 %

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

Generated by: LCOV version 1.8