summaryrefslogtreecommitdiff
path: root/Bus/Ivy/Ivy.h
diff options
context:
space:
mode:
authorfcolin2007-02-01 13:29:31 +0000
committerfcolin2007-02-01 13:29:31 +0000
commitafe2e7dfc1388cad991e8d38dda7d648c137aa52 (patch)
tree92bf63d2b2b34a805927aa294c7c51912638f66a /Bus/Ivy/Ivy.h
parent0be65f8a110ee9bf5da9c93e0bd5b5b62b3bad0c (diff)
parent04c263c314499e38d64af9d4a1aa5e2b8d9d5ead (diff)
downloadivy-cplusplus-windows@3001.zip
ivy-cplusplus-windows@3001.tar.gz
ivy-cplusplus-windows@3001.tar.bz2
ivy-cplusplus-windows@3001.tar.xz
modif struct svnwindows@3001
Diffstat (limited to 'Bus/Ivy/Ivy.h')
-rw-r--r--Bus/Ivy/Ivy.h119
1 files changed, 0 insertions, 119 deletions
diff --git a/Bus/Ivy/Ivy.h b/Bus/Ivy/Ivy.h
deleted file mode 100644
index cf90bdd..0000000
--- a/Bus/Ivy/Ivy.h
+++ /dev/null
@@ -1,119 +0,0 @@
-// Ivy.h: interface for the Ivy class.
-//
-//////////////////////////////////////////////////////////////////////
-
-
-#pragma once
-#pragma warning(disable: 4251)
-
-#ifdef WIN32
-#ifdef IVY_EXPORTS
-class _declspec(dllexport) IvyWatcher;
-class _declspec(dllexport) IvyApplication;
-class _declspec(dllexport) Ivy;
-class _declspec(dllexport) CThreadedSocket;
-class _declspec(dllexport) CBufferedSocket;
-#else
-#pragma comment(lib,"Ivy.LIB" )
-class _declspec(dllimport) IvyWatcher;
-class _declspec(dllimport) IvyApplication;
-class _declspec(dllimport) Ivy;
-class _declspec(dllimport) CThreadedSocket;
-class _declspec(dllimport) CBufferedSocket;
-#endif
-#endif
-
-#ifdef IVY_USE_OWN_DATATYPES
-
-#include "DataTypes.h"
-
-#else
-
-#include <string>
-#include <list>
-#include <vector>
-#include <map>
-
-namespace ivy = std;
-
-#endif
-
-#include "IvyCallback.h"
-
-
-class Ivy
-{
- friend class IvyWatcher;
-
- friend class IvyApplication;
-
-private:
- int regexp_id;
- unsigned int applicationPort;
- void SendSubscriptions(IvyApplication *app);
- bool synchronous; // use Window Shink to made CB mono thread like
- IvyApplication * server;
- IvyWatcher * watcher;
- IvyDieCallback *die_callback;
- IvyDirectMessageCallback *direct_callback;
- IvyApplicationCallback *application_callback;
- IvyBindingCallback *binding_callback;
- /* list des adresses de broadcast */
- ivy::string domain;
- /* nom de l'appliction */
- ivy::string ApplicationName;
- /* Aplication Unique ID */
- ivy::string ApplicationID;
- /* liste des clients connectes */
- CRITICAL_SECTION m_application_cs;
- typedef ivy::list<IvyApplication*> IvyApplicationList;
- IvyApplicationList applications;
-
- /* liste des souscriptions locale a emettre aux autres applications */
- ivy::vector<ivy::string> regexp_out;
- /* liste des callbacks a appeler */
- ivy::vector< IvyMessageCallback* > callbacks;
-
-protected:
- void SubstituteInterval (const char *src, char *dst, size_t dst_len);
- void AddApplication( IvyApplication *app );
- void RemoveApplication( IvyApplication *app);
-
- bool CheckConnected( IvyApplication *app );
- void CallApplicationConnectedCallback( IvyApplication *app );
- void CallApplicationDisconnectedCallback( IvyApplication *app );
- void CallBindingAddCallback(IvyApplication * app, int id, const char * regexp);
- void CallBindingRemoveCallback(IvyApplication * app, int id, const char * regexp);
- void CallBindingFilterCallback(IvyApplication * app, int id, const char * regexp);
- bool CallDieCallback( IvyApplication *app, int id, const char *arg );
- void CallDirectMessageCallback( IvyApplication *app, int id, const char *arg );
- void CallMessageCallback( IvyApplication *app, int id, int argc, const char **argv );
-
- const char *GenApplicationUniqueIdentifier();
-
- /* message a emettre sur connection nouvelle application */
- ivy::string ready_message;
-
-public:
-
- void SetBindCallback( IvyBindingCallback* bind_callback );
- void SetFilter( int argc, const char **argv );
- void SendDieMsg( IvyApplication *app );
- IvyApplication *GetApplication(const char *name);
- void SendDirectMsg( IvyApplication *app, int id, const char *message);
- void BindDirectMsg( IvyDirectMessageCallback *callback );
- int SendMsg( const char *message, ... );
-
- const char *GetDomain(const char *domainlist);
- unsigned int GetApplicationPort();
- int BindMsg( const char *regexp, IvyMessageCallback *cb );
- int BindMsg( IvyMessageCallback *cb, const char *regexp, ... );
- void UnbindMsg( int id );
- Ivy( const char *name, const char* ready, IvyApplicationCallback *callback, bool Synchronous = true );
- void start(const char *domain);
- void stop();
- virtual ~Ivy();
-
-
-
-};