Commit Graph

17 Commits

Author SHA1 Message Date
Anthony Minessale 32273a0c3f xmppmas
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@196 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-23 02:24:56 +00:00
Anthony Minessale 0fd698a347 fix
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@192 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-22 22:17:25 +00:00
Anthony Minessale 3e0234219b use more of apr-utils in the event stuff
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@191 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-22 18:53:33 +00:00
Anthony Minessale e60fbc2267 get uuid from apr-utils for channel events
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@190 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-22 01:57:32 +00:00
Anthony Minessale 6949227ca1 more events and some build changes
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@188 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-21 22:25:22 +00:00
Anthony Minessale 146b99e1d6 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@184 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-21 16:24:37 +00:00
Anthony Minessale e4aae70c44 make it work on w32
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@174 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-19 20:03:37 +00:00
Anthony Minessale ab0b99eb00 more event stuff
you should now be able to bind an event handler to a 
paticiular file or function not just a paticular event
when using the custom event 

like "file:somefile.c"
or "func:somefunc"

also events now have headers which can be added 
with varargs and should be created and delivered with api calls


switch_event *event;

regular event:
if (switch_event_create(&event, SWITCH_EVENT_STARTUP) == SWITCH_STATUS_SUCCESS) {
	switch_event_add_header(event, "event_info", "System Ready");
	switch_event_fire(&event);
}

custom event:
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, "some_subclass_string") == SWITCH_STATUS_SUCCESS) {
	switch_event_add_header(event, "event_info", "hello world %d", 42);
	switch_event_fire(&event);
} 

switch_event_add_header(event, "test %d", 42);

also you can serialize and event into a buffer in
a printable/transferrable format with optional body

char buf[1024];

with body:
switch_event_serialize(event, buf, sizeof(buf), "This is a body my favorite number is %d", 42);

no body:
switch_event_serialize(event, buf, sizeof(buf), NULL);






git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@173 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-19 19:57:32 +00:00
Anthony Minessale 2a58e2038a yet more rearrangment of events ;-)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@172 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-19 18:55:31 +00:00
Anthony Minessale 033ee66fb1 add untested event changes
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@159 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-15 23:56:21 +00:00
Anthony Minessale b09fedf7e0 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@158 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-15 20:20:57 +00:00
Anthony Minessale 48e62491e1 make eventing cooler, yeah I know it's only 1 day old but... *shrug*
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@156 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-15 19:10:43 +00:00
Anthony Minessale 230c5012a6 more event code
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@153 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-14 22:46:09 +00:00
Anthony Minessale 03533ad0f3 make events queue in the bg
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@152 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-14 21:29:46 +00:00
Anthony Minessale e16f28d529 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@151 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-14 20:22:19 +00:00
Anthony Minessale 7125eac731 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@146 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-14 01:40:51 +00:00
Anthony Minessale 2620e0aa30 events
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@131 d0543943-73ff-0310-b7d9-9358b9ac24b2
2005-12-13 20:52:33 +00:00