summaryrefslogtreecommitdiff
path: root/src/ivy.h
diff options
context:
space:
mode:
authorbustico2008-05-19 15:31:30 +0000
committerbustico2008-05-19 15:31:30 +0000
commit09f82d4e1e6dd1672b272c314c42d5cf30c91ea8 (patch)
treea25557d3aad5edc2641f98ea434e0b676f6b6872 /src/ivy.h
parent7cd590600a7ff3dd8defc3d639fd3e87f1973015 (diff)
downloadivy-c-09f82d4e1e6dd1672b272c314c42d5cf30c91ea8.zip
ivy-c-09f82d4e1e6dd1672b272c314c42d5cf30c91ea8.tar.gz
ivy-c-09f82d4e1e6dd1672b272c314c42d5cf30c91ea8.tar.bz2
ivy-c-09f82d4e1e6dd1672b272c314c42d5cf30c91ea8.tar.xz
* make the lib and api more robust by adding const where they should be
* compile with -Wall and eliminate remaining warnings
Diffstat (limited to 'src/ivy.h')
-rw-r--r--src/ivy.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ivy.h b/src/ivy.h
index bd107ff..1701fc1 100644
--- a/src/ivy.h
+++ b/src/ivy.h
@@ -29,22 +29,23 @@ extern "C" {
/* numero par default du bus */
-typedef struct _clnt_lst_dict *IvyClientPtr;
+typedef struct _clnt_lst_dict *RWIvyClientPtr;
+typedef const struct _clnt_lst_dict *IvyClientPtr;
typedef enum { IvyApplicationConnected, IvyApplicationDisconnected,
- IvyApplicationCongestion , IvyApplicationDecongestion ,
+ IvyApplicationCongestion , IvyApplicationDecongestion,
IvyApplicationFifoFull } IvyApplicationEvent;
typedef enum { IvyAddBind, IvyRemoveBind, IvyFilterBind, IvyChangeBind } IvyBindEvent;
extern void IvyDefaultApplicationCallback( IvyClientPtr app, void *user_data, IvyApplicationEvent event ) ;
-extern void IvyDefaultBindCallback( IvyClientPtr app, void *user_data, int id, char* regexp, IvyBindEvent event ) ;
+extern void IvyDefaultBindCallback( IvyClientPtr app, void *user_data, int id, const char* regexp, IvyBindEvent event ) ;
/* callback callback appele sur connexion deconnexion d'une appli */
typedef void (*IvyApplicationCallback)( IvyClientPtr app, void *user_data, IvyApplicationEvent event ) ;
/* callback callback appele sur ajout ou suppression d'un bind */
-typedef void (*IvyBindCallback)( IvyClientPtr app, void *user_data, int id, char* regexp, IvyBindEvent event ) ;
+typedef void (*IvyBindCallback)( IvyClientPtr app, void *user_data, int id, const char* regexp, IvyBindEvent event ) ;
/* callback appele sur reception de die */
typedef void (*IvyDieCallback)( IvyClientPtr app, void *user_data, int id ) ;
@@ -93,11 +94,11 @@ __attribute__((format(printf,2,3))); /* avec sprintf prealable */
void IvyUnbindMsg( MsgRcvPtr id );
/* emission d'un message d'erreur */
-void IvySendError( IvyClientPtr app, int id, const char *fmt, ... )
+void IvySendError(IvyClientPtr app, int id, const char *fmt, ... )
__attribute__((format(printf,3,4))) ; /* avec sprintf prealable */
/* emmission d'un message die pour terminer l'application */
-void IvySendDieMsg( IvyClientPtr app );
+void IvySendDieMsg(IvyClientPtr app );
/* emission d'un message retourne le nb effectivement emis */