Skip to content

Commit 4c4f40a

Browse files
committed
update data packa object
1 parent 9a3e09b commit 4c4f40a

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

Heart/AbstractSpace/abstractnodeinfo.h

+6-7
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ class HEARTSHARED_EXPORT AbstractNodeInfo: public QObject
7373
*/
7474
AbstractNodeInfo(QAbstractSocket *sct = nullptr,
7575
const HostAddress* address = nullptr);
76-
7776
/**
7877
* @brief ~AbstractNodeInfo
7978
*/
@@ -206,19 +205,19 @@ public slots:
206205
* @brief sigConnected This is wrapper signal for the QAbstractSocket::connetced signal.
207206
* @param thisNode This is pointer to current object.
208207
*/
209-
void sigConnected(AbstractNodeInfo* thisNode);
208+
void sigConnected(QH::AbstractNodeInfo* thisNode);
210209

211210
/**
212211
* @brief sigDisconnected This is wrapper signal for the QAbstractSocket::disconnected signal.
213212
* @param thisNode This is pointer to current object.
214213
*/
215-
void sigDisconnected(AbstractNodeInfo* thisNode);
214+
void sigDisconnected(QH::AbstractNodeInfo* thisNode);
216215

217216
/**
218217
* @brief sigReadyRead This is wrapper signal for the QAbstractSocket::readyRead signal.
219218
* @param thisNode This is pointer to current object.
220219
*/
221-
void sigReadyRead(AbstractNodeInfo* thisNode);
220+
void sigReadyRead(QH::AbstractNodeInfo* thisNode);
222221

223222
/**
224223
* @brief sigErrorOccurred This is wrapper signal for the QAbstractSocket::errorOccurred signal.
@@ -227,22 +226,22 @@ public slots:
227226
* @param message This is a error string message.
228227
* For more information see the QAbstractSocket::SocketError enum class.
229228
*/
230-
void sigErrorOccurred(AbstractNodeInfo* thisNode,
229+
void sigErrorOccurred(QH::AbstractNodeInfo* thisNode,
231230
QAbstractSocket::SocketError socketError,
232231
QString message);
233232

234233
/**
235234
* @brief sigConfirmed This signal emitted when node is confirmnd. The confirm status sets in the confirmData method.
236235
* @param thisNode This is pointer to current object.
237236
*/
238-
void sigConfirmed(AbstractNodeInfo* thisNode);
237+
void sigConfirmed(QH::AbstractNodeInfo* thisNode);
239238

240239
/**
241240
* @brief statusChaned This signal emitted when nodes status is changed.
242241
* @param thisNode This is pointer to current object.
243242
* @param status This is status of node. For more information see the NodeCoonectionStatus enum.
244243
*/
245-
void statusChaned(AbstractNodeInfo* thisNode, NodeCoonectionStatus status);
244+
void statusChaned(QH::AbstractNodeInfo* thisNode, QH::NodeCoonectionStatus status);
246245

247246
protected:
248247

Heart/AbstractSpace/packages/datapack.h

+8
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ class DataPack final: public AbstractData
5353
_packData.push_back(data);
5454
};
5555

56+
/**
57+
* @brief push This method append @a data to end of list.
58+
* @param data This is new data pacakge that will be added into back of this list.
59+
*/
60+
void push(const Package& data) {
61+
_packData.push_back(QSharedPointer<Package>::create(data));
62+
};
63+
5664
/**
5765
* @brief isValid This implementation check all items of the pack to valid and packa size. The pack size should be more then 0.
5866
* @return true if the pack of items is valid else flase..

0 commit comments

Comments
 (0)