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