Back to index

im-sdk  12.3.91
IMScheduler.hh
Go to the documentation of this file.
00001 #ifndef IMSCHEDULER_HH_
00002 #define IMSCHEDULER_HH_
00003 #include <config.h>
00004 #include <stdio.h>
00005 #include "basictype.hh"
00006 
00007 class IMProtocol;
00008 class IMHandler;
00009 class IMAccept;
00010 class IMState;
00011 
00012 class IMScheduler
00013 {
00014     // singleton
00015     static IMScheduler *pimscheduler;
00016   protected:
00017     void register_singleton()
00018     { pimscheduler = this; }
00019   public:
00020     static IMScheduler *get_instance()
00021     {
00022        ASSERT(pimscheduler);
00023        return pimscheduler;
00024     }
00025    
00026     virtual int start(IMAccept *pima, IMProtocol *pimp, IMState *pims) = 0; 
00027     virtual int stop() = 0;
00028     IMScheduler() {}
00029 };
00030 
00031 #endif /* not IMSCHEDULER_HH_ */
00032 
00033 /* Local Variables: */
00034 /* c-file-style: "iiim-project" */
00035 /* End: */