Instrument Neutral Distributed Interface INDI  2.0.2
baseclient.h
Go to the documentation of this file.
1 /*******************************************************************************
2  Copyright(c) 2011 Jasem Mutlaq. All rights reserved.
3  2022 Ludovic Pollet
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 *******************************************************************************/
19 
20 #pragma once
21 
22 #ifndef SWIG
23 #include "abstractbaseclient.h"
24 #else
25 %include "abstractbaseclient.h"
26 #endif
27 
47 namespace INDI
48 {
49 class BaseClientPrivate;
50 }
52 {
53  DECLARE_PRIVATE_D(d_ptr_indi, BaseClient)
54 
55  public:
56  BaseClient();
57  virtual ~BaseClient();
58 
59  public:
64  bool connectServer() override;
65 
70  bool disconnectServer(int exit_code = 0) override;
71 
72  public:
83  void enableDirectBlobAccess(const char * dev = nullptr, const char * prop = nullptr);
84 };
std::unique_ptr< AbstractBaseClientPrivate > d_ptr_indi
Class to provide basic client functionality.
Definition: baseclient.h:52
virtual ~BaseClient()
Definition: baseclient.cpp:292
void enableDirectBlobAccess(const char *dev=nullptr, const char *prop=nullptr)
activate zero-copy delivering of the blob content. When enabled, all blob copy will be avoided when p...
Definition: baseclient.cpp:360
bool disconnectServer(int exit_code=0) override
Disconnect from INDI server. Any devices previously created will be deleted and memory cleared.
Definition: baseclient.cpp:343
bool connectServer() override
Connect to INDI server.
Definition: baseclient.cpp:308
Namespace to encapsulate INDI client, drivers, and mediator classes.