UniMRCP
1.3.0
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
libs
mpf
include
mpf_context.h
Go to the documentation of this file.
1
/*
2
* Copyright 2008-2014 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
* $Id: mpf_context.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
17
*/
18
19
#ifndef MPF_CONTEXT_H
20
#define MPF_CONTEXT_H
21
22
/**
23
* @file mpf_context.h
24
* @brief MPF Context
25
*/
26
27
#include "
mpf_types.h
"
28
29
APT_BEGIN_EXTERN_C
30
31
/** Opaque factory of media contexts */
32
typedef
struct
mpf_context_factory_t
mpf_context_factory_t
;
33
34
/**
35
* Create factory of media contexts.
36
*/
37
MPF_DECLARE
(
mpf_context_factory_t
*)
mpf_context_factory_create
(apr_pool_t *pool);
38
39
/**
40
* Destroy factory of media contexts.
41
*/
42
MPF_DECLARE
(
void
)
mpf_context_factory_destroy
(
mpf_context_factory_t
*factory);
43
44
/**
45
* Process factory of media contexts.
46
*/
47
MPF_DECLARE
(
apt_bool_t
)
mpf_context_factory_process
(
mpf_context_factory_t
*factory);
48
49
/**
50
* Create MPF context.
51
* @param factory the factory context belongs to
52
* @param name the informative name of the context
53
* @param obj the external object associated with context
54
* @param max_termination_count the max number of terminations in context
55
* @param pool the pool to allocate memory from
56
*/
57
MPF_DECLARE
(
mpf_context_t
*)
mpf_context_create
(
58
mpf_context_factory_t
*factory,
59
const
char
*name,
60
void
*obj,
61
apr_size_t max_termination_count,
62
apr_pool_t *pool);
63
64
/**
65
* Destroy MPF context.
66
* @param context the context to destroy
67
*/
68
MPF_DECLARE
(
apt_bool_t
)
mpf_context_destroy
(
mpf_context_t
*context);
69
70
/**
71
* Get external object associated with MPF context.
72
* @param context the context to get object from
73
*/
74
MPF_DECLARE
(
void
*)
mpf_context_object_get
(const
mpf_context_t
*context);
75
76
/**
77
* Add termination to context.
78
* @param context the context to add termination to
79
* @param termination the termination to add
80
*/
81
MPF_DECLARE
(
apt_bool_t
)
mpf_context_termination_add
(
mpf_context_t
*context,
mpf_termination_t
*termination);
82
83
/**
84
* Subtract termination from context.
85
* @param context the context to subtract termination from
86
* @param termination the termination to subtract
87
*/
88
MPF_DECLARE
(
apt_bool_t
)
mpf_context_termination_subtract
(
mpf_context_t
*context,
mpf_termination_t
*termination);
89
90
/**
91
* Add association between specified terminations.
92
* @param context the context to add association in the scope of
93
* @param termination1 the first termination to associate
94
* @param termination2 the second termination to associate
95
*/
96
MPF_DECLARE
(
apt_bool_t
)
mpf_context_association_add
(
mpf_context_t
*context,
mpf_termination_t
*termination1,
mpf_termination_t
*termination2);
97
98
/**
99
* Remove association between specified terminations.
100
* @param context the context to remove association in the scope of
101
* @param termination1 the first termination
102
* @param termination2 the second termination
103
*/
104
MPF_DECLARE
(
apt_bool_t
)
mpf_context_association_remove
(
mpf_context_t
*context,
mpf_termination_t
*termination1,
mpf_termination_t
*termination2);
105
106
/**
107
* Reset assigned associations and destroy applied topology.
108
* @param context the context to reset associations for
109
*/
110
MPF_DECLARE
(
apt_bool_t
)
mpf_context_associations_reset
(
mpf_context_t
*context);
111
112
/**
113
* Apply topology.
114
* @param context the context to apply topology for
115
*/
116
MPF_DECLARE
(
apt_bool_t
)
mpf_context_topology_apply
(
mpf_context_t
*context);
117
118
/**
119
* Destroy topology.
120
* @param context the context to destroy topology for
121
*/
122
MPF_DECLARE
(
apt_bool_t
)
mpf_context_topology_destroy
(
mpf_context_t
*context);
123
124
/**
125
* Process context.
126
* @param context the context to process
127
*/
128
MPF_DECLARE
(
apt_bool_t
)
mpf_context_process
(
mpf_context_t
*context);
129
130
131
APT_END_EXTERN_C
132
133
#endif
/* MPF_CONTEXT_H */
Generated on Mon Feb 2 2015 19:41:38 for UniMRCP by
1.8.3.1