aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/indications.h
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-30 17:10:11 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-30 17:10:11 +0000
commit70020a2853bd51930d36fd997fc71eedfe71eb6e (patch)
tree56636b4d708638cdb380dc76672be39341eec1f9 /include/asterisk/indications.h
parentcd3c76f7f1e6a0655e035b8ab8d164109d31f92c (diff)
do not export the tzlock and the list head, and introduce a new method,
ast_walk_indications(), to walk through the list of indications. The new method returns an unlocked record, which is no different from the behaviour of other existing methods in indications.c (i.e. they all need to be fixed, with refcounts or some similar method). Note that ast_walk_indications() uses the pointer argument only as a search key, so its implementation is completely safe. In turn, this change allows the removal of AST_MUTEX_DEFINE_EXPORTED. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16532 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/indications.h')
-rw-r--r--include/asterisk/indications.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/include/asterisk/indications.h b/include/asterisk/indications.h
index 6b55d90aa..188baa29b 100644
--- a/include/asterisk/indications.h
+++ b/include/asterisk/indications.h
@@ -59,29 +59,34 @@ struct tone_zone {
};
/* set the default tone country */
-extern int ast_set_indication_country(const char *country);
+int ast_set_indication_country(const char *country);
/* locate tone_zone, given the country. if country == NULL, use the default country */
-extern struct tone_zone *ast_get_indication_zone(const char *country);
+struct tone_zone *ast_get_indication_zone(const char *country);
/* locate a tone_zone_sound, given the tone_zone. if tone_zone == NULL, use the default tone_zone */
-extern struct tone_zone_sound *ast_get_indication_tone(const struct tone_zone *zone, const char *indication);
+struct tone_zone_sound *ast_get_indication_tone(const struct tone_zone *zone, const char *indication);
/* add a new country, if country exists, it will be replaced. */
-extern int ast_register_indication_country(struct tone_zone *country);
+int ast_register_indication_country(struct tone_zone *country);
/* remove an existing country and all its indications, country must exist */
-extern int ast_unregister_indication_country(const char *country);
+int ast_unregister_indication_country(const char *country);
/* add a new indication to a tone_zone. tone_zone must exist. if the indication already
* exists, it will be replaced. */
-extern int ast_register_indication(struct tone_zone *zone, const char *indication, const char *tonelist);
+int ast_register_indication(struct tone_zone *zone, const char *indication, const char *tonelist);
/* remove an existing tone_zone's indication. tone_zone must exist */
-extern int ast_unregister_indication(struct tone_zone *zone, const char *indication);
+int ast_unregister_indication(struct tone_zone *zone, const char *indication);
/* Start a tone-list going */
int ast_playtones_start(struct ast_channel *chan, int vol, const char* tonelist, int interruptible);
/*! Stop the tones from playing */
void ast_playtones_stop(struct ast_channel *chan);
+/* support for walking through a list of indications */
+struct tone_zone *ast_walk_indications(const struct tone_zone *cur);
+
+#if 0
extern struct tone_zone *tone_zones;
extern ast_mutex_t tzlock;
+#endif
#endif /* _ASTERISK_INDICATIONS_H */