LCOV - code coverage report
Current view: top level - tests/harness - backendmanager_remote.h (source / functions) Hit Total Coverage
Test: Test Coverage for xapian-core 7028d852e609 Lines: 3 3 100.0 %
Date: 2019-02-17 14:59:59 Functions: 2 2 100.0 %
Branches: 2 4 50.0 %

           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                 :            :  * Copyright (C) 2018 Olly Betts
       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_REMOTE_H
      23                 :            : #define XAPIAN_INCLUDED_BACKENDMANAGER_REMOTE_H
      24                 :            : 
      25                 :            : #include "backendmanager.h"
      26                 :            : 
      27                 :            : #include <string>
      28                 :            : #include <vector>
      29                 :            : 
      30                 :            : /// BackendManager subclass for remote databases.
      31         [ -  + ]:          4 : class BackendManagerRemote : public BackendManager {
      32                 :            :     /// Don't allow assignment.
      33                 :            :     void operator=(const BackendManagerRemote &);
      34                 :            : 
      35                 :            :     /// Don't allow copying.
      36                 :            :     BackendManagerRemote(const BackendManagerRemote &);
      37                 :            : 
      38                 :            :   protected:
      39                 :            :     BackendManager* sub_manager;
      40                 :            : 
      41                 :            :   public:
      42                 :          2 :     explicit BackendManagerRemote(BackendManager* sub_manager_)
      43                 :            :         : BackendManager(std::string()),
      44         [ +  - ]:          2 :           sub_manager(sub_manager_) {}
      45                 :            : 
      46                 :            :     /// Get the args for opening a remote database indexing a single file.
      47                 :            :     std::string get_writable_database_args(const std::string & name,
      48                 :            :                                            const std::string & file);
      49                 :            : 
      50                 :            :     /// Get the args for opening a remote database with the specified timeout.
      51                 :            :     std::string get_remote_database_args(const std::vector<std::string> & files,
      52                 :            :                                          unsigned int timeout);
      53                 :            : 
      54                 :            :     /// Get the args for opening the last opened WritableDatabase.
      55                 :            :     std::string get_writable_database_as_database_args();
      56                 :            : 
      57                 :            :     /// Get the args for opening the last opened WritableDatabase again.
      58                 :            :     std::string get_writable_database_again_args();
      59                 :            : };
      60                 :            : 
      61                 :            : #endif // XAPIAN_INCLUDED_BACKENDMANAGER_REMOTE_H

Generated by: LCOV version 1.11