00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __CODEX_KEYSERVICE_SUPPORTEDKEYSTOREDEVENT_H__
00022 #define __CODEX_KEYSERVICE_SUPPORTEDKEYSTOREDEVENT_H__
00023
00024 #include "SupportedKeyStoredMsg.h"
00025 #include "SupportedClientResponseEvent.h"
00026
00027 namespace CODEX_KeyService
00028 {
00036 class SupportedKeyStoredEvent : public SupportedClientResponseEventBase
00037 {
00038 public :
00040 typedef SupportedKeyStoredMsg MsgType;
00041
00043 SupportedKeyStoredEvent(
00044 CODEX_Events::Activity* source,
00045 unsigned char* server,
00046 unsigned char* seqNum,
00047 SupportedClientResponseHandler* destination,
00048 const MsgType& message ) :
00049 SupportedClientResponseEventBase( source, server, seqNum ),
00050 m_destination( destination ),
00051 m_message( message )
00052 {}
00053
00055 SupportedKeyStoredEvent(
00056 CODEX_Events::Activity* source,
00057 unsigned char* server,
00058 unsigned char* seqNum,
00059 SupportedClientResponseHandler* destination ) :
00060 SupportedClientResponseEventBase( source, server, seqNum ),
00061 m_destination( destination )
00062 {}
00063
00065 virtual ~SupportedKeyStoredEvent() {}
00066
00068 const MsgType& message() const { return m_message; }
00069
00074 bool handle();
00075
00083 void reRoute( SupportedClientResponseHandler* newDestination )
00084 {
00085 m_destination = newDestination;
00086 }
00087
00089 int marshal( unsigned char ** pp )
00090 {
00091 return m_message.marshal(pp);
00092 }
00093
00095 bool unmarshal( unsigned char ** pp, long length )
00096 {
00097 if ( NULL == m_message.unmarshal( NULL, pp, length ) )
00098 {
00099 return false;
00100 }
00101 return true;
00102 }
00103
00104 private :
00105 SupportedClientResponseHandler* m_destination;
00106 MsgType m_message;
00107 };
00108 }
00109
00110 #endif