constify functions

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7186 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-01-12 07:14:48 +00:00
parent 85f4ecd7b2
commit 0fc1cd534a
2 changed files with 8 additions and 8 deletions

View File

@ -211,7 +211,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_dup(switch_event_t **event, switch_
\param user_data optional private data to pass to the event handlers \param user_data optional private data to pass to the event handlers
\return \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 \brief Bind an event callback to a specific event
@ -222,7 +222,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *fun
\param user_data optional user specific data to pass whenever the callback is invoked \param user_data optional user specific data to pass whenever the callback is invoked
\return SWITCH_STATUS_SUCCESS if the event was binded \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); void *user_data);
/*! /*!
@ -238,7 +238,7 @@ SWITCH_DECLARE(char *) switch_event_name(switch_event_types_t event);
\param type the event id to return \param type the event id to return
\return SWITCH_STATUS_SUCCESS if there was a match \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 \brief Reserve a subclass name for private use with a custom event
@ -248,7 +248,7 @@ SWITCH_DECLARE(switch_status_t) switch_name_event(char *name, switch_event_types
\note There is nothing to enforce this but I reccommend using module::event_name for the subclass names \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 \brief Render a string representation of an event sutable for printing or network transport

View File

@ -289,7 +289,7 @@ SWITCH_DECLARE(char *) switch_event_name(switch_event_types_t event)
return EVENT_NAMES[event]; 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_event_types_t x;
switch_assert(BLOCK != NULL); switch_assert(BLOCK != NULL);
@ -305,7 +305,7 @@ SWITCH_DECLARE(switch_status_t) switch_name_event(char *name, switch_event_types
return SWITCH_STATUS_FALSE; 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; switch_event_subclass_t *subclass;
@ -861,7 +861,7 @@ SWITCH_DECLARE(switch_xml_t) switch_event_xmlize(switch_event_t *event, const ch
return xml; 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; switch_time_exp_t tm;
char date[80] = ""; char date[80] = "";
@ -937,7 +937,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *fun
return SWITCH_STATUS_SUCCESS; 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) void *user_data)
{ {
switch_event_node_t *event_node; switch_event_node_t *event_node;