00001 #ifndef _SPP_H__
00002 #define _SPP_H__
00003
00004 #include <gea/Time.h>
00005 #include <awds/MarshalStream.h>
00006 #include <stdint.h>
00007
00008
00009
00010
00011
00012
00013
00014
00015 class SppManager {
00016
00017 public:
00018
00019 typedef int (*spp_request_handler) (void *data,
00020 ReadMarshalStream* msIn, WriteMarshalStream* msOut,
00021 const awds::NodeId& src);
00022
00023 typedef int (*spp_response_handler)(void *data, ReadMarshalStream* msIn,
00024 const awds::NodeId& src);
00025
00026 typedef void (*spp_request_creator) (void *data, WriteMarshalStream* msOut);
00027
00028 typedef void (*spp_finished_handler) (void *data);
00029
00030 virtual ~SppManager() {}
00031
00032 virtual void registerHandler( uint32_t _spp_id, void * data, spp_request_handler handler) = 0;
00033
00034 virtual int sendRequest( const awds::NodeId& dest, uint32_t spp_id,
00035 void * data1, spp_request_creator h1,
00036 void * data2, spp_response_handler h2) = 0;
00037
00038 virtual int sendRequestAll( uint32_t spp_id,
00039 void * data1, spp_request_creator h1,
00040 void * data2, spp_response_handler h2,
00041 void * data3, spp_finished_handler h3) = 0;
00042
00043 };
00044
00045
00046 #endif //SPP_H__
00047
00048
00049
00050
00051
00052