[Freeswitch-svn] [commit] r7186 - in freeswitch/trunk/src: . include
Freeswitch SVN
mikej at freeswitch.org
Sat Jan 12 02:14:49 EST 2008
Author: mikej
Date: Sat Jan 12 02:14:48 2008
New Revision: 7186
Modified:
freeswitch/trunk/src/include/switch_event.h
freeswitch/trunk/src/switch_event.c
Log:
constify functions
Modified: freeswitch/trunk/src/include/switch_event.h
==============================================================================
--- freeswitch/trunk/src/include/switch_event.h (original)
+++ freeswitch/trunk/src/include/switch_event.h Sat Jan 12 02:14:48 2008
@@ -211,7 +211,7 @@
\param user_data optional private data to pass to the event handlers
\return
*/
-SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *func, int line, switch_event_t **event, void *user_data);
+SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(const char *file, const char *func, int line, switch_event_t **event, void *user_data);
/*!
\brief Bind an event callback to a specific event
@@ -222,7 +222,7 @@
\param user_data optional user specific data to pass whenever the callback is invoked
\return SWITCH_STATUS_SUCCESS if the event was binded
*/
-SWITCH_DECLARE(switch_status_t) switch_event_bind(const char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback,
+SWITCH_DECLARE(switch_status_t) switch_event_bind(const char *id, switch_event_types_t event, const char *subclass_name, switch_event_callback_t callback,
void *user_data);
/*!
@@ -238,7 +238,7 @@
\param type the event id to return
\return SWITCH_STATUS_SUCCESS if there was a match
*/
-SWITCH_DECLARE(switch_status_t) switch_name_event(char *name, switch_event_types_t *type);
+SWITCH_DECLARE(switch_status_t) switch_name_event(const char *name, switch_event_types_t *type);
/*!
\brief Reserve a subclass name for private use with a custom event
@@ -248,7 +248,7 @@
\note There is nothing to enforce this but I reccommend using module::event_name for the subclass names
*/
-SWITCH_DECLARE(switch_status_t) switch_event_reserve_subclass_detailed(char *owner, char *subclass_name);
+SWITCH_DECLARE(switch_status_t) switch_event_reserve_subclass_detailed(const char *owner, const char *subclass_name);
/*!
\brief Render a string representation of an event sutable for printing or network transport
Modified: freeswitch/trunk/src/switch_event.c
==============================================================================
--- freeswitch/trunk/src/switch_event.c (original)
+++ freeswitch/trunk/src/switch_event.c Sat Jan 12 02:14:48 2008
@@ -289,7 +289,7 @@
return EVENT_NAMES[event];
}
-SWITCH_DECLARE(switch_status_t) switch_name_event(char *name, switch_event_types_t *type)
+SWITCH_DECLARE(switch_status_t) switch_name_event(const char *name, switch_event_types_t *type)
{
switch_event_types_t x;
switch_assert(BLOCK != NULL);
@@ -305,7 +305,7 @@
return SWITCH_STATUS_FALSE;
}
-SWITCH_DECLARE(switch_status_t) switch_event_reserve_subclass_detailed(char *owner, char *subclass_name)
+SWITCH_DECLARE(switch_status_t) switch_event_reserve_subclass_detailed(const char *owner, const char *subclass_name)
{
switch_event_subclass_t *subclass;
@@ -861,7 +861,7 @@
return xml;
}
-SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *func, int line, switch_event_t **event, void *user_data)
+SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(const char *file, const char *func, int line, switch_event_t **event, void *user_data)
{
switch_time_exp_t tm;
char date[80] = "";
@@ -937,7 +937,7 @@
return SWITCH_STATUS_SUCCESS;
}
-SWITCH_DECLARE(switch_status_t) switch_event_bind(const char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback,
+SWITCH_DECLARE(switch_status_t) switch_event_bind(const char *id, switch_event_types_t event, const char *subclass_name, switch_event_callback_t callback,
void *user_data)
{
switch_event_node_t *event_node;
More information about the Freeswitch-svn
mailing list