Skip to content

Commit

Permalink
update data packa object
Browse files Browse the repository at this point in the history
  • Loading branch information
EndrII committed Nov 12, 2022
1 parent 9a3e09b commit 4c4f40a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Heart/AbstractSpace/abstractnodeinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ class HEARTSHARED_EXPORT AbstractNodeInfo: public QObject
*/
AbstractNodeInfo(QAbstractSocket *sct = nullptr,
const HostAddress* address = nullptr);

/**
* @brief ~AbstractNodeInfo
*/
Expand Down Expand Up @@ -206,19 +205,19 @@ public slots:
* @brief sigConnected This is wrapper signal for the QAbstractSocket::connetced signal.
* @param thisNode This is pointer to current object.
*/
void sigConnected(AbstractNodeInfo* thisNode);
void sigConnected(QH::AbstractNodeInfo* thisNode);

/**
* @brief sigDisconnected This is wrapper signal for the QAbstractSocket::disconnected signal.
* @param thisNode This is pointer to current object.
*/
void sigDisconnected(AbstractNodeInfo* thisNode);
void sigDisconnected(QH::AbstractNodeInfo* thisNode);

/**
* @brief sigReadyRead This is wrapper signal for the QAbstractSocket::readyRead signal.
* @param thisNode This is pointer to current object.
*/
void sigReadyRead(AbstractNodeInfo* thisNode);
void sigReadyRead(QH::AbstractNodeInfo* thisNode);

/**
* @brief sigErrorOccurred This is wrapper signal for the QAbstractSocket::errorOccurred signal.
Expand All @@ -227,22 +226,22 @@ public slots:
* @param message This is a error string message.
* For more information see the QAbstractSocket::SocketError enum class.
*/
void sigErrorOccurred(AbstractNodeInfo* thisNode,
void sigErrorOccurred(QH::AbstractNodeInfo* thisNode,
QAbstractSocket::SocketError socketError,
QString message);

/**
* @brief sigConfirmed This signal emitted when node is confirmnd. The confirm status sets in the confirmData method.
* @param thisNode This is pointer to current object.
*/
void sigConfirmed(AbstractNodeInfo* thisNode);
void sigConfirmed(QH::AbstractNodeInfo* thisNode);

/**
* @brief statusChaned This signal emitted when nodes status is changed.
* @param thisNode This is pointer to current object.
* @param status This is status of node. For more information see the NodeCoonectionStatus enum.
*/
void statusChaned(AbstractNodeInfo* thisNode, NodeCoonectionStatus status);
void statusChaned(QH::AbstractNodeInfo* thisNode, QH::NodeCoonectionStatus status);

protected:

Expand Down
8 changes: 8 additions & 0 deletions Heart/AbstractSpace/packages/datapack.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ class DataPack final: public AbstractData
_packData.push_back(data);
};

/**
* @brief push This method append @a data to end of list.
* @param data This is new data pacakge that will be added into back of this list.
*/
void push(const Package& data) {
_packData.push_back(QSharedPointer<Package>::create(data));
};

/**
* @brief isValid This implementation check all items of the pack to valid and packa size. The pack size should be more then 0.
* @return true if the pack of items is valid else flase..
Expand Down

0 comments on commit 4c4f40a

Please sign in to comment.