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

QuorumBuilderExpectNonceEvent.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: QuorumBuilderExpectNonceEvent.h,v 1.3 2004/05/19 15:56:58 mmarsh Exp $
00008 //
00009 // $Log: QuorumBuilderExpectNonceEvent.h,v $
00010 // Revision 1.3  2004/05/19 15:56:58  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_QUORUMBUILDEREXPECTNONCEEVENT_H__
00019 #define __CODEX_SERVER_QUORUMBUILDEREXPECTNONCEEVENT_H__
00020 
00021 #include "CODEX_Events/Event.h"
00022 #include "QuorumBuilderAct.h"
00023 
00024 namespace CODEX_Server
00025 {
00029    class QuorumBuilderExpectNonceEvent : public CODEX_Events::EventBase
00030    {
00031       public :
00033          QuorumBuilderExpectNonceEvent( QuorumBuilderAct* act, int hostNum ) :
00034             CODEX_Events::EventBase( act ),
00035             m_act( act ),
00036             m_hostNum( hostNum ),
00037             m_toRead( 0 )
00038          {}
00039 
00041          virtual ~QuorumBuilderExpectNonceEvent() {}
00042 
00044          bool handle() { return m_act->handler( *this ); }
00045 
00047          int hostNum() const { return m_hostNum; }
00048 
00053          bool read( CODEX_Quorum::RemoteServer* server );
00054 
00056          const CODEX_Quorum::Message& buffer() const { return m_buffer; }
00057 
00058       private :
00059          QuorumBuilderAct*      m_act;
00060          int                    m_hostNum;
00061          CODEX_Quorum::Message  m_buffer;
00062          int                    m_toRead;
00063    };
00064 
00065 }
00066 
00067 #endif /* __CODEX_SERVER_QUORUMBUILDEREXPECTNONCEEVENT_H__ */

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