From ee937667fd0ecd82faab4c88d756b906fb625f1a Mon Sep 17 00:00:00 2001 From: sc Date: Tue, 28 Nov 2000 17:07:47 +0000 Subject: Integration into IvyLeague Uvh -> Ivl Multiplexer.* is renamed into Scheduler.* A few name conflicts in the merger with ex-DNN have been solved Imakefile is replaced by Makefile Created InetAddress.* and UnixAddress.* from Address.* Created IrdaAddress.* OLD/TextStream has been updated --- comm/BusAccess.h | 108 ++++++++++++++++++++++++++----------------------------- 1 file changed, 50 insertions(+), 58 deletions(-) (limited to 'comm/BusAccess.h') diff --git a/comm/BusAccess.h b/comm/BusAccess.h index 4c18d5c..3d45db8 100644 --- a/comm/BusAccess.h +++ b/comm/BusAccess.h @@ -12,7 +12,6 @@ * $CurLog$ */ - #ifndef BusAccess_H_ #define BusAccess_H_ @@ -20,119 +19,112 @@ #include "Stream.h" #include "BufStream.h" #include "SignalHandler.h" -#include "ccu/List.h" -#include "ccu/IdTable.h" -#include "ccu/String.h" -#include "ccu/HashTable.h" -#include "dnn/Event.h" -#include "dnn/Trigger.h" - +#include "ivl/List.h" +#include "ivl/IdTable.h" +#include "ivl/String.h" +#include "ivl/HashTable.h" +#include "ivl/Event.h" +#include "ivl/Trigger.h" -class UchBusSubscription; -class UchBusTrigger; -class DnnBaseReaction; +class IvlBusSubscription; +class IvlBusTrigger; +class IvlBaseReaction; -class UchBusAccess : public UchDatagram, public UchBaseSignalHandler { -friend class UchBusAgent; +class IvlBusAccess : public IvlDatagram, public IvlBaseScheduledHandler { +friend class IvlBusAgent; protected: static int Version; static const char* const DefaultBus; static const char* const DefaultBusNet; static sword const DefaultBusPort; - CcuString Name; + IvlString Name; sword ListenPort; sword BroadcastPort; - UchStream* Server; - CcuListOf Agents; - CcuListOf LocalSubscriptions; - CcuIdTableOf IdToSubscription; + IvlStream* Server; + IvlListOf Agents; + IvlListOf LocalSubscriptions; + IvlIdTableOf IdToSubscription; void HandleRead (); void Clear (); void DeferredHandle (int); void HandleEvent (int, const char*); - bool CheckUnicity (UchBusAgent*, sword); + bool CheckUnicity (IvlBusAgent*, sword); public: - DnnTrigger NewAgents; + IvlTrigger NewAgents; - UchBusAccess (const char*, const char* = 0); - ~UchBusAccess (); - void Subscribe (DnnBaseReaction&, const char*, ...); + IvlBusAccess (const char*, const char* = 0); + ~IvlBusAccess (); + void Subscribe (IvlBaseReaction&, const char*, ...); void Emit (const char*, ...); }; - -class UchBusAgent : public UchBufStream { -friend class UchBusAccess; -friend class UchBusServer; +class IvlBusAgent : public IvlBufStream { +friend class IvlBusAccess; +friend class IvlBusServer; protected: - CcuListOf RemoteSubscriptions; + IvlListOf RemoteSubscriptions; sword RemoteId; - UchBusAccess* MyBus; - CcuString Name; + IvlBusAccess* MyBus; + IvlString Name; void WriteString (const char*); void ProcessLine (const char*); - UchBusAgent (int, UchBusAccess*); - UchBusAgent (const char*, sword, UchBusAccess*); - ~UchBusAgent (); + IvlBusAgent (int, IvlBusAccess*); + IvlBusAgent (const char*, sword, IvlBusAccess*); + ~IvlBusAgent (); void HandleRead (); - void SendLocalSubscription (const UchBusTrigger*); + void SendLocalSubscription (const IvlBusTrigger*); void SayHello (); void SayBye (); void EmitEvent (const char*); public: - DnnTrigger Bye; - CcuHashedArrayOf DirectMsg; + IvlTrigger Bye; + IvlHashedArrayOf DirectMsg; void Emit (int, const char*, ...); inline const char* GetName () const { return Name; } }; -class UchAgentEvent : public DnnEvent { +class IvlAgentEvent : public IvlEvent { public: -static DnnEventType* BusNewAgent, *BusAgentBye; +static IvlEventType* BusNewAgent, *BusAgentBye; protected: - UchBusAgent* Agent; + IvlBusAgent* Agent; public: - UchAgentEvent (UchBusAgent*, DnnEventType*); - ~UchAgentEvent (); - + IvlAgentEvent (IvlBusAgent*, IvlEventType*); + ~IvlAgentEvent (); -inline UchBusAgent* GetAgent () const { return Agent;} +inline IvlBusAgent* GetAgent () const { return Agent;} }; - -class UchDirectEvent : public DnnEvent { +class IvlDirectEvent : public IvlEvent { public: - UchBusAgent* Agent; - CcuString Msg; + IvlBusAgent* Agent; + IvlString Msg; public: - UchDirectEvent (UchBusAgent*, const char*); - ~UchDirectEvent (); + IvlDirectEvent (IvlBusAgent*, const char*); + ~IvlDirectEvent (); }; - - -class UchBusEvent : public DnnEvent { +class IvlBusEvent : public IvlEvent { public: - CcuString Regexp; + IvlString Regexp; int NbMatches; - CcuListOf MatchList; - CcuString Matches; + IvlListOf MatchList; + IvlString Matches; - UchBusEvent (const char*, const char*); - ~UchBusEvent (); + IvlBusEvent (const char*, const char*); + ~IvlBusEvent (); }; - #endif /* BusAccess_H_ */ -- cgit v1.1