diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2010-08-21 04:38:31 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2010-08-21 04:38:31 +0000 |
| commit | e23028eb568f7f541c2717b5b4fb2c4cf1e2a690 (patch) | |
| tree | d693cd5f605bc05008466cda6ddc8a1323ecacb3 /src | |
| parent | 11b5a91c5884d496744911f261ed6c2b053b9940 (diff) | |
| download | libgats-e23028eb568f7f541c2717b5b4fb2c4cf1e2a690.tar.gz libgats-e23028eb568f7f541c2717b5b4fb2c4cf1e2a690.tar.bz2 libgats-e23028eb568f7f541c2717b5b4fb2c4cf1e2a690.tar.xz libgats-e23028eb568f7f541c2717b5b4fb2c4cf1e2a690.zip | |
Packet was silly, the protocol will be good, though.
Diffstat (limited to 'src')
| -rw-r--r-- | src/packet.cpp | 10 | ||||
| -rw-r--r-- | src/packet.h | 29 | ||||
| -rw-r--r-- | src/protocolgats.cpp | 14 | ||||
| -rw-r--r-- | src/protocolgats.h | 22 |
4 files changed, 36 insertions, 39 deletions
diff --git a/src/packet.cpp b/src/packet.cpp deleted file mode 100644 index 6283ce5..0000000 --- a/src/packet.cpp +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | #include "gats/packet.h" | ||
| 2 | |||
| 3 | Gats::Packet::Packet() | ||
| 4 | { | ||
| 5 | } | ||
| 6 | |||
| 7 | Gats::Packet::~Packet() | ||
| 8 | { | ||
| 9 | } | ||
| 10 | |||
diff --git a/src/packet.h b/src/packet.h deleted file mode 100644 index 5ddc9ee..0000000 --- a/src/packet.h +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | #ifndef GATS_PACKET_H | ||
| 2 | #define GATS_PACKET_H | ||
| 3 | |||
| 4 | namespace Gats | ||
| 5 | { | ||
| 6 | class Object; | ||
| 7 | |||
| 8 | /** | ||
| 9 | * A D-encoded packet is a header and metadata related to encoding as well | ||
| 10 | * as a single object. The advantage of this method is that the packet | ||
| 11 | * contains all information related to encoding and is highly portable, it | ||
| 12 | * also lets the reader know how much data to expect, which makes this | ||
| 13 | * efficient for use in protocols and embedding in other data streams. | ||
| 14 | */ | ||
| 15 | class Packet | ||
| 16 | { | ||
| 17 | public: | ||
| 18 | Packet(); | ||
| 19 | Packet( Object *pObject ); | ||
| 20 | virtual ~Packet(); | ||
| 21 | |||
| 22 | Object *getObject() { return pRoot; } | ||
| 23 | |||
| 24 | private: | ||
| 25 | Object *pRoot; | ||
| 26 | }; | ||
| 27 | }; | ||
| 28 | |||
| 29 | #endif | ||
diff --git a/src/protocolgats.cpp b/src/protocolgats.cpp new file mode 100644 index 0000000..fbb25a5 --- /dev/null +++ b/src/protocolgats.cpp | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #include "gats/protocolgats.h" | ||
| 2 | |||
| 3 | Gats::ProtocolGats::ProtocolGats() | ||
| 4 | { | ||
| 5 | } | ||
| 6 | |||
| 7 | Gats::ProtocolGats::~ProtocolGats() | ||
| 8 | { | ||
| 9 | } | ||
| 10 | |||
| 11 | void Gats::ProtocolGats::onNewData( Bu::Client *pClient ) | ||
| 12 | { | ||
| 13 | } | ||
| 14 | |||
diff --git a/src/protocolgats.h b/src/protocolgats.h new file mode 100644 index 0000000..cab5217 --- /dev/null +++ b/src/protocolgats.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #ifndef GATS_PROTOCOL_GATS_H | ||
| 2 | #define GATS_PROTOCOL_GATS_H | ||
| 3 | |||
| 4 | #include <bu/protocol.h> | ||
| 5 | |||
| 6 | namespace Gats | ||
| 7 | { | ||
| 8 | class ProtocolGats : public Bu::Protocol | ||
| 9 | { | ||
| 10 | public: | ||
| 11 | ProtocolGats(); | ||
| 12 | virtual ~ProtocolGats(); | ||
| 13 | |||
| 14 | virtual void onNewData( Bu::Client *pClient ); | ||
| 15 | |||
| 16 | virtual void onNewObject( Gats::Object *pObj )=0; | ||
| 17 | |||
| 18 | private: | ||
| 19 | }; | ||
| 20 | }; | ||
| 21 | |||
| 22 | #endif | ||
