ArnLib  4.0.x
Active Registry Network
ArnPipe.hpp
Go to the documentation of this file.
1 // Copyright (C) 2010-2022 Michael Wiklund.
2 // All rights reserved.
3 // Contact: arnlib@wiklunden.se
4 //
5 // This file is part of the ArnLib - Active Registry Network.
6 // Parts of ArnLib depend on Qt and/or other libraries that have their own
7 // licenses. Usage of these other libraries is subject to their respective
8 // license agreements.
9 //
10 // GNU Lesser General Public License Usage
11 // This file may be used under the terms of the GNU Lesser General Public
12 // License version 2.1 as published by the Free Software Foundation and
13 // appearing in the file LICENSE_LGPL.txt included in the packaging of this
14 // file. In addition, as a special exception, you may use the rights described
15 // in the Nokia Qt LGPL Exception version 1.1, included in the file
16 // LGPL_EXCEPTION.txt in this package.
17 //
18 // GNU General Public License Usage
19 // Alternatively, this file may be used under the terms of the GNU General Public
20 // License version 3.0 as published by the Free Software Foundation and appearing
21 // in the file LICENSE_GPL.txt included in the packaging of this file.
22 //
23 // Other Usage
24 // Alternatively, this file may be used in accordance with the terms and conditions
25 // contained in a signed written agreement between you and Michael Wiklund.
26 //
27 // This program is distributed in the hope that it will be useful, but WITHOUT ANY
28 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
29 // PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
30 //
31 
32 #ifndef ARNPIPE_HPP
33 #define ARNPIPE_HPP
34 
35 #include "ArnLib_global.hpp"
36 #include "ArnItemB.hpp"
37 #include "ArnCompat.hpp"
38 
39 class ArnPipePrivate;
40 
41 
43 
65 {
66  Q_OBJECT
67  Q_DECLARE_PRIVATE(ArnPipe)
68 
69 public:
71 
73  ArnPipe( QObject* parent = arnNullptr);
74 
76 
81  ArnPipe( const QString& path, QObject* parent = arnNullptr);
82 
83  virtual ~ArnPipe();
84 
86 
90  bool openUuid( const QString& path)
91  {return ArnItemB::openUuidPipe( path);}
92 
94 
99  {ArnItemB::setMaster(); return *this;}
100 
105  bool isMaster() const
106  {return ArnItemB::isMaster();}
107 
109 
113  {ArnItemB::setAutoDestroy(); return *this;}
114 
118  bool isAutoDestroy() const
119  {return ArnItemB::isAutoDestroy();}
120 
121  ArnPipe& operator=( const QByteArray& value);
122 
124 
137  void setValueOverwrite( const QByteArray& value, const ARN_RegExp& rx);
138 
140 
143  bool isSendSeq() const;
144 
146 
152  void setSendSeq( bool useSendSeq);
153 
155 
158  bool isCheckSeq() const;
159 
161 
167  void setCheckSeq( bool useCheckSeq);
168 
169 public slots:
171 
173  void setValue( const QByteArray& value);
174 
175 signals:
177 
180  void changed( const QByteArray& value);
181 
183 
187  void outOfSequence();
188 
190 protected:
191  virtual void itemUpdated( const ArnLinkHandle& handleData, const QByteArray* value = arnNullptr);
192 
193  ArnPipe( ArnPipePrivate& dd, QObject* parent);
195 
196 private slots:
197 
198 private:
199  void init();
200  void setupSeq( ArnLinkHandle& handleData);
201 };
202 
203 #endif // ARNPIPE_HPP
void setValue(const ArnBasicItem &other, int ignoreSame=Arn::SameValue::DefaultAction)
bool isMaster() const
bool isAutoDestroy() const
Definition: ArnPipe.hpp:118
bool openUuid(const QString &path)
Open a handle to an Arn Pipe Object with a unique uuid name.
Definition: ArnPipe.hpp:90
#define ARN_RegExp
Definition: ArnCompat.hpp:70
ArnPipe & setMaster()
Set client session sync mode as Master for this ArnItem.
Definition: ArnPipe.hpp:98
bool isAutoDestroy() const
Base class handle for an Arn Data Object.
Definition: ArnItemB.hpp:59
ArnBasicItem & setAutoDestroy()
Set client session sync mode as AutoDestroy for this ArnItem.
ArnItem specialized as a pipe.
Definition: ArnPipe.hpp:64
#define ARNLIBSHARED_EXPORT
bool isMaster() const
Definition: ArnPipe.hpp:105
ArnPipe & setAutoDestroy()
Set client session sync mode as AutoDestroy for this ArnItem.
Definition: ArnPipe.hpp:112
ArnBasicItem & setMaster()
Set client session sync mode as Master for this ArnItem.
ArnBasicItem & operator=(const ArnBasicItem &other)