summaryrefslogtreecommitdiff
path: root/Bus
diff options
context:
space:
mode:
Diffstat (limited to 'Bus')
-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