~damg/ubuntu/quantal/asterisk/LP1097687

« back to all changes in this revision

Viewing changes to include/asterisk/smdi.h

  • Committer: Bazaar Package Importer
  • Author(s): Jean-Michel Dault
  • Date: 2010-02-16 14:08:54 UTC
  • mfrom: (1.2.5 upstream) (8.3.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100216140854-rb2godspb9lduazl
Tags: 1:1.6.2.2-1ubuntu1
* Merge from Debian: security update
  * Changes:
  - debian/control: Change Maintainer
  - debian/control: Removed Uploaders field.
  - debian/control: Removed Debian Vcs-Svn entry and replaced with
      ubuntu-voip Vcs-Bzr, to reflect divergence in packages.
  - debian/asterisk.init : chown /dev/dahdi
  - debian/backports/hardy : add file
  - debian/backports/asterisk.init.hardy : add file

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
#include "asterisk/config.h"
38
38
#include "asterisk/module.h"
39
39
#include "asterisk/astobj.h"
40
 
#include "asterisk/optional_api.h"
41
40
 
42
41
#define SMDI_MESG_DESK_NUM_LEN 3
43
42
#define SMDI_MESG_DESK_TERM_LEN 4
85
84
 */
86
85
struct ast_smdi_interface;
87
86
 
88
 
AST_OPTIONAL_API(void, ast_smdi_interface_unref, (struct ast_smdi_interface
89
 
        *iface), { return; });
 
87
void ast_smdi_interface_unref(struct ast_smdi_interface *iface) attribute_weak;
90
88
 
91
89
/*! 
92
90
 * \brief Get the next SMDI message from the queue.
98
96
 *
99
97
 * \return the next SMDI message, or NULL if there were no pending messages.
100
98
 */
101
 
AST_OPTIONAL_API(struct ast_smdi_md_message *, ast_smdi_md_message_pop, (struct
102
 
        ast_smdi_interface *iface), { return NULL; });
 
99
struct ast_smdi_md_message *ast_smdi_md_message_pop(struct ast_smdi_interface *iface) attribute_weak;
103
100
 
104
101
/*!
105
102
 * \brief Get the next SMDI message from the queue.
113
110
 * \return the next SMDI message, or NULL if there were no pending messages and
114
111
 * the timeout has expired.
115
112
 */
116
 
AST_OPTIONAL_API(struct ast_smdi_md_message *, ast_smdi_md_message_wait,
117
 
        (struct ast_smdi_interface *iface, int timeout), { return NULL; });
 
113
struct ast_smdi_md_message *ast_smdi_md_message_wait(struct ast_smdi_interface *iface, int timeout) attribute_weak;
118
114
 
119
115
/*!
120
116
 * \brief Put an SMDI message back in the front of the queue.
125
121
 * should be used if a message was popped but is not going to be processed for
126
122
 * some reason, and the message needs to be returned to the queue.
127
123
 */
128
 
AST_OPTIONAL_API(void, ast_smdi_md_message_putback, (struct ast_smdi_interface
129
 
        *iface, struct ast_smdi_md_message *msg), { return; });
 
124
void ast_smdi_md_message_putback(struct ast_smdi_interface *iface, struct ast_smdi_md_message *msg) attribute_weak;
130
125
 
131
126
/*!
132
127
 * \brief Get the next SMDI message from the queue.
138
133
 *
139
134
 * \return the next SMDI message, or NULL if there were no pending messages.
140
135
 */
141
 
AST_OPTIONAL_API(struct ast_smdi_mwi_message *, ast_smdi_mwi_message_pop,
142
 
        (struct ast_smdi_interface *iface), { return NULL; });
 
136
struct ast_smdi_mwi_message *ast_smdi_mwi_message_pop(struct ast_smdi_interface *iface) attribute_weak;
143
137
 
144
138
/*!
145
139
 * \brief Get the next SMDI message from the queue.
153
147
 * \return the next SMDI message, or NULL if there were no pending messages and
154
148
 * the timeout has expired.
155
149
 */
156
 
AST_OPTIONAL_API(struct ast_smdi_mwi_message *, ast_smdi_mwi_message_wait,
157
 
        (struct ast_smdi_interface *iface, int timeout), { return NULL; });
158
 
AST_OPTIONAL_API(struct ast_smdi_mwi_message *,
159
 
        ast_smdi_mwi_message_wait_station, (struct ast_smdi_interface *iface, int
160
 
        timeout, const char *station), { return NULL; });
 
150
struct ast_smdi_mwi_message *ast_smdi_mwi_message_wait(struct ast_smdi_interface *iface, int timeout) attribute_weak;
 
151
struct ast_smdi_mwi_message *ast_smdi_mwi_message_wait_station(struct ast_smdi_interface *iface, int
 
152
        timeout, const char *station) attribute_weak;
161
153
 
162
154
/*!
163
155
 * \brief Put an SMDI message back in the front of the queue.
168
160
 * should be used if a message was popped but is not going to be processed for
169
161
 * some reason, and the message needs to be returned to the queue.
170
162
 */
171
 
AST_OPTIONAL_API(void, ast_smdi_mwi_message_putback, (struct ast_smdi_interface
172
 
        *iface, struct ast_smdi_mwi_message *msg), { return; });
 
163
void ast_smdi_mwi_message_putback(struct ast_smdi_interface *iface, struct ast_smdi_mwi_message *msg) attribute_weak;
173
164
 
174
165
/*!
175
166
 * \brief Find an SMDI interface with the specified name.
179
170
 * actually returns an ASTOBJ reference and should be released using
180
171
 * #ASTOBJ_UNREF(iface, ast_smdi_interface_destroy).
181
172
 */
182
 
AST_OPTIONAL_API(struct ast_smdi_interface *, ast_smdi_interface_find,
183
 
        (const char *iface_name), { return NULL; });
 
173
struct ast_smdi_interface *ast_smdi_interface_find(const char *iface_name) attribute_weak;
184
174
 
185
175
/*!
186
176
 * \brief Set the MWI indicator for a mailbox.
187
177
 * \param iface the interface to use.
188
178
 * \param mailbox the mailbox to use.
189
179
 */
190
 
AST_OPTIONAL_API(int, ast_smdi_mwi_set, (struct ast_smdi_interface *iface,
191
 
        const char *mailbox), { return -1; });
 
180
int ast_smdi_mwi_set(struct ast_smdi_interface *iface, const char *mailbox) attribute_weak;
192
181
 
193
182
/*! 
194
183
 * \brief Unset the MWI indicator for a mailbox.
195
184
 * \param iface the interface to use.
196
185
 * \param mailbox the mailbox to use.
197
186
 */
198
 
AST_OPTIONAL_API(int, ast_smdi_mwi_unset, (struct ast_smdi_interface *iface,
199
 
        const char *mailbox), { return -1; });
 
187
int ast_smdi_mwi_unset(struct ast_smdi_interface *iface, const char *mailbox) attribute_weak;
200
188
 
201
189
/*! \brief ast_smdi_md_message destructor. */
202
 
AST_OPTIONAL_API(void, ast_smdi_md_message_destroy,
203
 
        (struct ast_smdi_md_message *msg), { return; });
 
190
void ast_smdi_md_message_destroy(struct ast_smdi_md_message *msg) attribute_weak;
204
191
 
205
192
/*! \brief ast_smdi_mwi_message destructor. */
206
 
AST_OPTIONAL_API(void, ast_smdi_mwi_message_destroy, (struct
207
 
        ast_smdi_mwi_message *msg), { return; });
 
193
void ast_smdi_mwi_message_destroy(struct ast_smdi_mwi_message *msg) attribute_weak;
208
194
 
209
195
#endif /* !ASTERISK_SMDI_H */