diff options
author | fcolin | 2007-02-01 13:01:47 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 13:01:47 +0000 |
commit | 90496dc2a3afe9011f9ab5838bfd76e2d48811ce (patch) | |
tree | 53a3117b2de6f2c63e1e3789d6f1e3a93a5b1d2f /Bus | |
parent | a9c7f4e7a806b9c9672b20dcc0f3b0c88f9aeafd (diff) | |
download | ivy-cplusplus-90496dc2a3afe9011f9ab5838bfd76e2d48811ce.zip ivy-cplusplus-90496dc2a3afe9011f9ab5838bfd76e2d48811ce.tar.gz ivy-cplusplus-90496dc2a3afe9011f9ab5838bfd76e2d48811ce.tar.bz2 ivy-cplusplus-90496dc2a3afe9011f9ab5838bfd76e2d48811ce.tar.xz |
Utilisateur : Fcolin Date : 25/10/01 Heure : 18:39 Archivé dans $/Ivy (vss 2)
Diffstat (limited to 'Bus')
-rw-r--r-- | Bus/Ivy/IvyCbindings.h | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/Bus/Ivy/IvyCbindings.h b/Bus/Ivy/IvyCbindings.h index e69de29..fb12f55 100644 --- a/Bus/Ivy/IvyCbindings.h +++ b/Bus/Ivy/IvyCbindings.h @@ -0,0 +1,107 @@ +/*
+ * Ivy, C interface
+ *
+ * Copyright (C) 1997-2000
+ * Centre d'Études de la Navigation Aérienne
+ *
+ * Main functions
+ *
+ * Authors: François-Régis Colin <fcolin@cena.dgac.fr>
+ * Stéphane Chatty <chatty@cena.dgac.fr>
+ *
+ * $Id: ivy.h,v 1.8 2000/08/07 11:29:29 sc Exp $
+ *
+ * Please refer to file version.h for the
+ * copyright notice regarding this software
+ */
+
+#ifndef IVY_C_BINDINGS_H
+#define IVY_C_BINDINGS_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef WIN32
+#ifdef IVY_EXPORTS
+#define DLL_EXPORT _declspec(dllexport)
+#else
+#pragma comment(lib,"Ivy.LIB" )
+#define DLL_EXPORT /*_declspec(dllimport)*/
+#endif
+#endif
+
+
+/* numero par default du bus */
+
+#define DEFAULT_BUS 2010
+
+typedef void * Channel ;
+typedef int TimerId;
+
+typedef void * IvyClientPtr;
+
+typedef enum { IvyApplicationConnected, IvyApplicationDisconnected } IvyApplicationEvent;
+
+extern void IvyDefaultApplicationCallback( IvyClientPtr app, void *user_data, IvyApplicationEvent event ) ;
+
+/* callback callback appele sur connexion deconnexion d'une appli */
+typedef void (*IvyCApplicationCallback)( IvyClientPtr app, void *user_data, IvyApplicationEvent event ) ;
+
+/* callback appele sur reception de die */
+typedef void (*IvyCDieCallback)( IvyClientPtr app, void *user_data, int id ) ;
+
+/* callback appele sur reception de messages normaux */
+typedef void (*IvyCMsgCallback)( IvyClientPtr app, void *user_data, int argc, const char **argv ) ;
+
+/* callback appele sur reception de messages directs */
+typedef void (*IvyCMsgDirectCallback)( IvyClientPtr app, void *user_data, int id, char *msg ) ;
+
+/* identifiant d'une expression reguliere ( Bind/Unbind ) */
+typedef int MsgRcvPtr;
+
+/* filtrage des regexps */
+DLL_EXPORT void IvyClasses( int argc, const char **argv);
+
+DLL_EXPORT void IvyInit(
+ const char *AppName, /* nom de l'application */
+ const char *ready, /* ready Message peut etre NULL */
+ IvyCApplicationCallback callback, /* callback appele sur connection deconnection d'une appli */
+ void *data, /* user data passe au callback */
+ IvyCDieCallback die_callback, /* last change callback before die */
+ void *die_data ); /* user data */
+
+DLL_EXPORT void IvyStart (const char*);
+DLL_EXPORT void IvyStop ();
+
+/* query sur les applications connectees */
+DLL_EXPORT const char *IvyGetApplicationName( IvyClientPtr app );
+DLL_EXPORT const char *IvyGetApplicationHost( IvyClientPtr app );
+DLL_EXPORT IvyClientPtr IvyGetApplication( char *name );
+DLL_EXPORT const char *IvyGetApplicationList();
+DLL_EXPORT const char **IvyGetApplicationMessages( IvyClientPtr app); /* demande de reception d'un message */
+
+DLL_EXPORT MsgRcvPtr IvyBindMsg( IvyCMsgCallback callback, void *user_data, const char *fmt_regexp, ... ); /* avec sprintf prealable */
+DLL_EXPORT void IvyUnbindMsg( MsgRcvPtr id );
+
+/* emission d'un message d'erreur */
+DLL_EXPORT void IvySendError( IvyClientPtr app, int id, const char *fmt, ... );
+
+/* emmission d'un message die pour terminer l'application */
+DLL_EXPORT void IvySendDieMsg( IvyClientPtr app );
+
+/* emission d'un message retourne le nb effectivement emis */
+
+DLL_EXPORT int IvySendMsg( const char *fmt_message, ... ); /* avec sprintf prealable */
+
+/* Message Direct Inter-application */
+
+DLL_EXPORT void IvyBindDirectMsg( IvyCMsgDirectCallback callback, void *user_data);
+DLL_EXPORT void IvySendDirectMsg( IvyClientPtr app, int id, char *msg );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
|