summaryrefslogtreecommitdiff
path: root/Bus/Ivy
diff options
context:
space:
mode:
authorfcolin2007-02-01 13:03:24 +0000
committerfcolin2007-02-01 13:03:24 +0000
commitc35af9417286090f968d0eef9288fd00d2e736e8 (patch)
tree17dedf55181ea2b54c2ce1755692484c8a7e68be /Bus/Ivy
parent8481145fcaa2a08b6e27acde09948aa32d96e5f6 (diff)
downloadivy-cplusplus-c35af9417286090f968d0eef9288fd00d2e736e8.zip
ivy-cplusplus-c35af9417286090f968d0eef9288fd00d2e736e8.tar.gz
ivy-cplusplus-c35af9417286090f968d0eef9288fd00d2e736e8.tar.bz2
ivy-cplusplus-c35af9417286090f968d0eef9288fd00d2e736e8.tar.xz
Utilisateur : Fcolin Date : 1/06/06 Heure : 10:14 Archivé dans $/Bus/Ivy Commentaire: ajout Binding Callback et SetFilter (vss 13)
Diffstat (limited to 'Bus/Ivy')
-rw-r--r--Bus/Ivy/IvySynchroWnd.cxx53
1 files changed, 53 insertions, 0 deletions
diff --git a/Bus/Ivy/IvySynchroWnd.cxx b/Bus/Ivy/IvySynchroWnd.cxx
index 9df473a..2109a61 100644
--- a/Bus/Ivy/IvySynchroWnd.cxx
+++ b/Bus/Ivy/IvySynchroWnd.cxx
@@ -187,4 +187,57 @@ void IvySynchronousApplicationCallback::CallCallback()
target->OnApplicationDisconnected( app );
break;
}
+}
+
+
+IvySynchronousBindingCallback::IvySynchronousBindingCallback( IvyBindingCallback *cb )
+{
+ target = cb;
+}
+void IvySynchronousBindingCallback::OnAddBind( IvyApplication *app, int id, const char *regexp)
+{
+ // duplicate on the Message Queue
+ IvySynchronousBindingCallback *param = new IvySynchronousBindingCallback(target);
+ param->type = ADD_CB;
+ param->app = app;
+ param->id = id;
+ param->regexp = _strdup(regexp);
+ m_synchro->PostIvyCB( param );
+}
+
+void IvySynchronousBindingCallback::OnRemoveBind( IvyApplication *app, int id, const char *regexp)
+{
+ // duplicate on the Message Queue
+ IvySynchronousBindingCallback *param = new IvySynchronousBindingCallback(target);
+ param->type = REMOVE_CB;
+ param->app = app;
+ param->id = id;
+ param->regexp = _strdup(regexp);
+ m_synchro->PostIvyCB( param );
+}
+void IvySynchronousBindingCallback::OnFilterBind( IvyApplication *app, int id, const char *regexp)
+{
+ // duplicate on the Message Queue
+ IvySynchronousBindingCallback *param = new IvySynchronousBindingCallback(target);
+ param->type = FILTER_CB;
+ param->app = app;
+ param->id = id;
+ param->regexp = _strdup(regexp);
+ m_synchro->PostIvyCB( param );
+}
+void IvySynchronousBindingCallback::CallCallback()
+{
+ switch ( type )
+ {
+ case ADD_CB:
+ target->OnAddBind( app, id, regexp );
+ break;
+ case REMOVE_CB:
+ target->OnRemoveBind( app, id, regexp );
+ break;
+ case FILTER_CB:
+ target->OnFilterBind( app, id, regexp );
+ break;
+ }
+ delete regexp;
} \ No newline at end of file