Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

SignRequestEvent.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: SignRequestEvent.h,v 1.3 2004/05/19 15:56:59 mmarsh Exp $
00008 //
00009 // $Log: SignRequestEvent.h,v $
00010 // Revision 1.3  2004/05/19 15:56:59  mmarsh
00011 // *** empty log message ***
00012 //
00013 // Revision 1.2  2003/11/04 22:31:51  mmarsh
00014 // *** empty log message ***
00015 //
00016 //
00017 
00018 #ifndef __CODEX_SERVER_SIGNREQUESTEVENT_H__
00019 #define __CODEX_SERVER_SIGNREQUESTEVENT_H__
00020 
00021 #include "CODEX_Events/Event.h"
00022 #include "CODEX_Events/Activity.h"
00023 #include "CODEX_Quorum/Message.h"
00024 #include "CODEX_Quorum/ResponseCallback.h"
00025 #include "CODEX_Quorum/QuorumSystem.h"
00026 #include "SignRequestHandler.h"
00027 
00028 namespace CODEX_Server
00029 {
00034    class SignRequestEvent : public CODEX_Events::EventBase
00035    {
00036       public :
00038          SignRequestEvent( CODEX_Events::Activity* source,
00039                            SignRequestHandler* destination,
00040                            const CODEX_Quorum::Message& message,
00041                            CODEX_Quorum::ResponseCallback* cb,
00042                            bool acknowledge=false );
00043 
00045          virtual ~SignRequestEvent() {}
00046 
00048          const CODEX_Quorum::Message& message() const { return m_message; }
00049 
00051          CODEX_Quorum::ReturnVector& retVals() { return m_retVals; }
00052 
00054          CODEX_Quorum::ResponseCallback* cb() const { return m_cb; }
00055 
00057          bool acknowledge() const { return m_acknowledge; }
00058 
00060          bool bcast() const { return m_bcast; }
00061 
00063          void setBcast() { m_bcast = true; }
00064 
00066          unsigned long time() const { return m_time; }
00067 
00069          void updateTime( unsigned long time ) { m_time = time; }
00070 
00072          bool handle() { return m_destination->handler( *this ); }
00073 
00074       private :
00075          SignRequestHandler*              m_destination;
00076          CODEX_Quorum::Message            m_message;
00077          CODEX_Quorum::ResponseCallback*  m_cb;
00078          CODEX_Quorum::ReturnVector       m_retVals;
00079          bool                             m_acknowledge;
00080          bool                             m_bcast;
00081          unsigned long                    m_time;
00082    };
00083 
00084 }
00085 
00086 #endif /* __CODEX_SERVER_SIGNREQUESTEVENT_H__ */

Generated on Wed Jun 2 16:32:56 2004 for COrnell Data EXchange (CODEX) by doxygen1.2.18