Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

SupportedKeyStoredEvent.h

00001 /*
00002  * Copyright 2003 Michael A. Marsh, Cornell University. All rights reserved.
00003  * This software is released under the modified BSD license.
00004  * See the file LICENSE in the top-level directory for details.
00005  */
00006 //
00007 // $Id: SupportedKeyStoredEvent.h,v 1.4 2005/01/21 19:44:17 mmarsh Exp $
00008 //
00009 // $Log: SupportedKeyStoredEvent.h,v $
00010 // Revision 1.4  2005/01/21 19:44:17  mmarsh
00011 // Updated for compatibility with Doxygen 1.4.1
00012 //
00013 // Revision 1.3  2004/05/19 15:56:53  mmarsh
00014 // *** empty log message ***
00015 //
00016 // Revision 1.2  2003/11/04 22:31:49  mmarsh
00017 // *** empty log message ***
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 /* __CODEX_KEYSERVICE_SUPPORTEDKEYSTOREDEVENT_H__ */

Generated on Fri May 6 17:41:27 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1