UniMRCP  1.3.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mpf_message.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_message.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
17  */
18 
19 #ifndef MPF_MESSAGE_H
20 #define MPF_MESSAGE_H
21 
22 /**
23  * @file mpf_message.h
24  * @brief Media Processing Framework Message Definitions
25  */
26 
27 #include "mpf_types.h"
28 
30 
31 /** Max number of messages grouped in a container */
32 #define MAX_MPF_MESSAGE_COUNT 5
33 
34 /** Enumeration of MPF message types */
35 typedef enum {
36  MPF_MESSAGE_TYPE_REQUEST, /**< request message */
37  MPF_MESSAGE_TYPE_RESPONSE, /**< response message */
38  MPF_MESSAGE_TYPE_EVENT /**< event message */
40 
41 /** Enumeration of MPF status codes */
42 typedef enum {
43  MPF_STATUS_CODE_SUCCESS, /**< indicates success */
44  MPF_STATUS_CODE_FAILURE /**< indicates failure */
46 
47 
48 /** Enumeration of MPF commands */
49 typedef enum {
50  MPF_ADD_TERMINATION, /**< add termination to context */
51  MPF_MODIFY_TERMINATION, /**< modify termination properties */
52  MPF_SUBTRACT_TERMINATION,/**< subtract termination from context */
53  MPF_ADD_ASSOCIATION, /**< add association between terminations */
54  MPF_REMOVE_ASSOCIATION, /**< remove association between terminations */
55  MPF_RESET_ASSOCIATIONS, /**< reset associations among terminations (also destroy topology) */
56  MPF_APPLY_TOPOLOGY, /**< apply topology based on assigned associations */
57  MPF_DESTROY_TOPOLOGY /**< destroy applied topology */
59 
60 /** MPF message declaration */
62 /** MPF message container declaration */
64 
65 /** MPF message definition */
66 struct mpf_message_t {
67  /** Message type (request/response/event) */
69  /** Command identifier (add, modify, subtract, ...) */
71  /** Status code used in responses */
73 
74  /** Context */
76  /** Termination */
78  /** Associated termination */
80  /** Termination type dependent descriptor */
81  void *descriptor;
82 };
83 
84 /** MPF message container definition */
86  /** Number of actual messages */
87  apr_size_t count;
88  /** Array of messages */
90 };
91 
93 
94 #endif /* MPF_MESSAGE_H */