UniMRCP  1.7.0
mrcp_sofiasip_task.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2015 Arsen Chaloyan
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef MRCP_SOFIASIP_TASK_H
18 #define MRCP_SOFIASIP_TASK_H
19 
20 /**
21  * @file mrcp_sofiasip_task.h
22  * @brief Sofia-SIP Task
23  */
24 
25 #include "apt_task.h"
26 
28 
29 /** Opaque Sofia-SIP task declaration */
31 
32 /** Function prototype to create a nua instance */
33 typedef nua_t* (*create_nua_f)(void *obj, su_root_t *root);
34 
35 /**
36  * Create Sofia-SIP task.
37  * @param nua_creator the nua creator method
38  * @param obj the external object to pass to nua creator method
39  * @param msg_pool the pool of task messages
40  * @param pool the pool to allocate memory from
41  */
43  create_nua_f nua_creator,
44  void *obj,
45  apt_task_msg_pool_t *msg_pool,
46  apr_pool_t *pool);
47 
48 /**
49  * Destroy Sofia-SIP task.
50  * @param task the task to destroy
51  */
53 
54 /**
55  * Start Sofia-SIP task.
56  * @param task the task to start
57  */
59 
60 /**
61  * Terminate Sofia-SIP task.
62  * @param task the task to terminate
63  */
65 
66 /**
67  * Break main loop of Sofia-SIP task.
68  * @param task the task to break
69  */
71 
72 /**
73  * Get task base.
74  * @param task the Sofia-SIP task to get task base from
75  */
77 
78 /**
79  * Get task vtable.
80  * @param task the Sofia-SIP task to get vtable from
81  */
83 
84 /**
85  * Get external object.
86  * @param task the Sofia-SIP task to get object from
87  */
89 
90 /**
91  * Get su_root object.
92  * @param task the Sofia-SIP task to get su_root object from
93  */
95 
96 /**
97  * Get nua object.
98  * @param task the Sofia-SIP task to get nua object from
99  */
101 
102 
104 
105 #endif /* MRCP_SOFIASIP_TASK_H */
void * mrcp_sofia_task_object_get(const mrcp_sofia_task_t *task)
apt_task_vtable_t * mrcp_sofia_task_vtable_get(const mrcp_sofia_task_t *task)
apt_bool_t mrcp_sofia_task_terminate(mrcp_sofia_task_t *task)
typedefAPT_BEGIN_EXTERN_C struct mrcp_sofia_task_t mrcp_sofia_task_t
Definition: mrcp_sofiasip_task.h:30
#define APT_END_EXTERN_C
Definition: apt.h:38
int apt_bool_t
Definition: apt.h:57
mrcp_sofia_task_t * mrcp_sofia_task_create(create_nua_f nua_creator, void *obj, apt_task_msg_pool_t *msg_pool, apr_pool_t *pool)
#define APT_BEGIN_EXTERN_C
Definition: apt.h:36
#define APT_DECLARE(type)
Definition: apt.h:53
apt_bool_t mrcp_sofia_task_destroy(mrcp_sofia_task_t *task)
nua_t * mrcp_sofia_task_nua_get(const mrcp_sofia_task_t *task)
apt_task_t * mrcp_sofia_task_base_get(const mrcp_sofia_task_t *task)
typedefAPT_BEGIN_EXTERN_C struct apt_task_t apt_task_t
Definition: apt_task.h:31
apt_bool_t mrcp_sofia_task_start(mrcp_sofia_task_t *task)
Thread Execution Abstraction.
Definition: apt_task.h:224
void mrcp_sofia_task_break(mrcp_sofia_task_t *task)
struct apt_task_msg_pool_t apt_task_msg_pool_t
Definition: apt_task_msg.h:50
nua_t *(* create_nua_f)(void *obj, su_root_t *root)
Definition: mrcp_sofiasip_task.h:33
su_root_t * mrcp_sofia_task_su_root_get(const mrcp_sofia_task_t *task)