summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Ivy/Ivy.cxx30
1 files changed, 28 insertions, 2 deletions
diff --git a/Ivy/Ivy.cxx b/Ivy/Ivy.cxx
index 66c1715..2da3766 100644
--- a/Ivy/Ivy.cxx
+++ b/Ivy/Ivy.cxx
@@ -64,6 +64,7 @@ Ivy::Ivy(const char* name, const char * ready, IvyApplicationCallback *callback,
ApplicationName = name;
messages_classes_count = 0;
messages_classes = NULL;
+ binding_callback = NULL;
application_callback = synchronous ? new IvySynchronousApplicationCallback(callback) : callback;
direct_callback = NULL;
die_callback = NULL;
@@ -337,6 +338,27 @@ void Ivy::CallApplicationDisconnectedCallback(IvyApplication * app)
application_callback->OnApplicationDisconnected( app );
}
}
+void Ivy::CallBindingAddCallback(IvyApplication * app, int id, const char * regexp)
+{
+ if ( binding_callback )
+ {
+ binding_callback->OnAddBind( app, id, regexp );
+ }
+}
+void Ivy::CallBindingRemoveCallback(IvyApplication * app, int id, const char * regexp)
+{
+ if ( binding_callback )
+ {
+ binding_callback->OnRemoveBind( app, id, regexp );
+ }
+}
+void Ivy::CallBindingFilterCallback(IvyApplication * app, int id, const char * regexp)
+{
+ if ( binding_callback )
+ {
+ binding_callback->OnFilterBind( app, id, regexp );
+ }
+}
void Ivy::SendDirectMsg(IvyApplication * app, int id, const char *message)
{
app->SendMsg( IvyApplication::DirectMsg, id, message );
@@ -358,8 +380,12 @@ bool Ivy::CheckRegexp(const char * exp)
}
return regexp_ok;
}
-
-void Ivy::Classes(int argc, const char **argv )
+void Ivy::SetBindCallback( IvyBindingCallback* bind_callback )
+{
+ binding_callback = synchronous ? new IvySynchronousBindingCallback(bind_callback) : bind_callback;
+}
+
+void Ivy::SetFilter(int argc, const char **argv )
{
messages_classes_count = argc;
messages_classes = argv;