|
#pragma once
#include <google/protobuf/stubs/common.h>
//
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/repeated_field.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/generated_message_reflection.h>
#include "ProtoBufExampleProtocol.h"
#include "requests.pb.h"
#include "responses.pb.h"
/*C:\ProtoBuf>protoc.exe -I=C:\ProtoBuf --cpp_out=C:\ProtoBuf C:\ProtoBuf\responses.proto*/
class PROTOBUFEXAMPLEPROTOCOL_API ProtobufPacketImpl : public PushFramework::IncomingPacket, public PushFramework::OutgoingPacket
{
public:
ProtobufPacketImpl(int serviceId, google::protobuf::Message* message);
~ProtobufPacketImpl(void);
public:
virtual bool Decode(char* pBuf, unsigned int nSize);
virtual bool Encode();
virtual google::protobuf::Message& getStructuredData();
private:
int serviceId;
std::string* pEncodedStream;
google::protobuf::Message* message;
public:
std::string* getEncodedStream() const { return pEncodedStream; }
int getEncodedStreamSize();
int getServiceId() const { return serviceId; }
};
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.