UniMRCP  1.5.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mpf_context.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 MPF_CONTEXT_H
18 #define MPF_CONTEXT_H
19 
20 /**
21  * @file mpf_context.h
22  * @brief MPF Context
23  */
24 
25 #include "mpf_types.h"
26 
28 
29 /** Opaque factory of media contexts */
31 
32 /**
33  * Create factory of media contexts.
34  */
36 
37 /**
38  * Destroy factory of media contexts.
39  */
41 
42 /**
43  * Process factory of media contexts.
44  */
46 
47 /**
48  * Create MPF context.
49  * @param factory the factory context belongs to
50  * @param name the informative name of the context
51  * @param obj the external object associated with context
52  * @param max_termination_count the max number of terminations in context
53  * @param pool the pool to allocate memory from
54  */
56  mpf_context_factory_t *factory,
57  const char *name,
58  void *obj,
59  apr_size_t max_termination_count,
60  apr_pool_t *pool);
61 
62 /**
63  * Destroy MPF context.
64  * @param context the context to destroy
65  */
67 
68 /**
69  * Get external object associated with MPF context.
70  * @param context the context to get object from
71  */
72 MPF_DECLARE(void*) mpf_context_object_get(const mpf_context_t *context);
73 
74 /**
75  * Add termination to context.
76  * @param context the context to add termination to
77  * @param termination the termination to add
78  */
80 
81 /**
82  * Subtract termination from context.
83  * @param context the context to subtract termination from
84  * @param termination the termination to subtract
85  */
87 
88 /**
89  * Add association between specified terminations.
90  * @param context the context to add association in the scope of
91  * @param termination1 the first termination to associate
92  * @param termination2 the second termination to associate
93  */
95 
96 /**
97  * Remove association between specified terminations.
98  * @param context the context to remove association in the scope of
99  * @param termination1 the first termination
100  * @param termination2 the second termination
101  */
103 
104 /**
105  * Reset assigned associations and destroy applied topology.
106  * @param context the context to reset associations for
107  */
109 
110 /**
111  * Apply topology.
112  * @param context the context to apply topology for
113  */
115 
116 /**
117  * Destroy topology.
118  * @param context the context to destroy topology for
119  */
121 
122 /**
123  * Process context.
124  * @param context the context to process
125  */
127 
128 
130 
131 #endif /* MPF_CONTEXT_H */
apt_bool_t mpf_context_association_add(mpf_context_t *context, mpf_termination_t *termination1, mpf_termination_t *termination2)
Definition: mpf_termination.h:51
#define APT_END_EXTERN_C
Definition: apt.h:38
int apt_bool_t
Definition: apt.h:57
apt_bool_t mpf_context_termination_subtract(mpf_context_t *context, mpf_termination_t *termination)
apt_bool_t mpf_context_topology_apply(mpf_context_t *context)
#define MPF_DECLARE(type)
Definition: mpf.h:40
#define APT_BEGIN_EXTERN_C
Definition: apt.h:36
apt_bool_t mpf_context_topology_destroy(mpf_context_t *context)
apt_bool_t mpf_context_process(mpf_context_t *context)
mpf_context_t * mpf_context_create(mpf_context_factory_t *factory, const char *name, void *obj, apr_size_t max_termination_count, apr_pool_t *pool)
apt_bool_t mpf_context_destroy(mpf_context_t *context)
typedefAPT_BEGIN_EXTERN_C struct mpf_context_factory_t mpf_context_factory_t
Definition: mpf_context.h:30
MPF Types Declarations.
apt_bool_t mpf_context_termination_add(mpf_context_t *context, mpf_termination_t *termination)
struct mpf_context_t mpf_context_t
Definition: mpf_types.h:42
mpf_context_factory_t * mpf_context_factory_create(apr_pool_t *pool)
apt_bool_t mpf_context_association_remove(mpf_context_t *context, mpf_termination_t *termination1, mpf_termination_t *termination2)
apt_bool_t mpf_context_factory_process(mpf_context_factory_t *factory)
void * mpf_context_object_get(const mpf_context_t *context)
apt_bool_t mpf_context_associations_reset(mpf_context_t *context)
void mpf_context_factory_destroy(mpf_context_factory_t *factory)