blob: 0d073d499195e6f7ef18407c4f9ed6132458a4a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
// --------------------------------------------------------------------------
//
// File
// Name: Message.h
// Purpose: Protocol object base class
// Created: 2003/08/19
//
// --------------------------------------------------------------------------
#ifndef PROTOCOLOBJECT__H
#define PROTOCOLOBJECT__H
#include <memory>
class Protocol;
class ProtocolContext;
// --------------------------------------------------------------------------
//
// Class
// Name: Message
// Purpose: Basic object representation of objects to pass through a Protocol session
// Created: 2003/08/19
//
// --------------------------------------------------------------------------
class Message
{
public:
Message();
virtual ~Message();
Message(const Message &rToCopy);
// Info about this object
virtual int GetType() const;
virtual bool IsError(int &rTypeOut, int &rSubTypeOut) const;
virtual bool IsConversationEnd() const;
// reading and writing with Protocol objects
virtual void SetPropertiesFromStreamData(Protocol &rProtocol);
virtual void WritePropertiesToStreamData(Protocol &rProtocol) const;
virtual void LogSysLog(const char *Action) const { }
virtual void LogFile(const char *Action, FILE *file) const { }
};
/*
class Reply;
class Request : public Message
{
public:
Request() { }
virtual ~Request() { }
Request(const Request &rToCopy) { }
virtual std::auto_ptr<Reply> DoCommand(Protocol &rProtocol,
ProtocolContext &rContext) = 0;
};
class Reply : public Message
{
public:
Reply() { }
virtual ~Reply() { }
Reply(const Reply &rToCopy) { }
};
*/
#endif // PROTOCOLOBJECT__H
|