UniMRCP  1.7.0
mpf_message.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_MESSAGE_H
18 #define MPF_MESSAGE_H
19 
20 /**
21  * @file mpf_message.h
22  * @brief Media Processing Framework Message Definitions
23  */
24 
25 #include "mpf_types.h"
26 
28 
29 /** Max number of messages grouped in a container */
30 #define MAX_MPF_MESSAGE_COUNT 5
31 
32 /** Enumeration of MPF message types */
33 typedef enum {
34  MPF_MESSAGE_TYPE_REQUEST, /**< request message */
35  MPF_MESSAGE_TYPE_RESPONSE, /**< response message */
36  MPF_MESSAGE_TYPE_EVENT /**< event message */
38 
39 /** Enumeration of MPF status codes */
40 typedef enum {
41  MPF_STATUS_CODE_SUCCESS, /**< indicates success */
42  MPF_STATUS_CODE_FAILURE /**< indicates failure */
44 
45 
46 /** Enumeration of MPF commands */
47 typedef enum {
48  MPF_ADD_TERMINATION, /**< add termination to context */
49  MPF_MODIFY_TERMINATION, /**< modify termination properties */
50  MPF_SUBTRACT_TERMINATION,/**< subtract termination from context */
51  MPF_ADD_ASSOCIATION, /**< add association between terminations */
52  MPF_REMOVE_ASSOCIATION, /**< remove association between terminations */
53  MPF_RESET_ASSOCIATIONS, /**< reset associations among terminations (also destroy topology) */
54  MPF_APPLY_TOPOLOGY, /**< apply topology based on assigned associations */
55  MPF_DESTROY_TOPOLOGY /**< destroy applied topology */
57 
58 /** MPF message declaration */
60 /** MPF message container declaration */
62 
63 /** MPF message definition */
64 struct mpf_message_t {
65  /** Message type (request/response/event) */
67  /** Command identifier (add, modify, subtract, ...) */
69  /** Status code used in responses */
71 
72  /** Context */
74  /** Termination */
76  /** Associated termination */
78  /** Termination type dependent descriptor */
79  void *descriptor;
80 };
81 
82 /** MPF message container definition */
84  /** Number of actual messages */
85  apr_size_t count;
86  /** Array of messages */
88 };
89 
91 
92 #endif /* MPF_MESSAGE_H */
Definition: mpf_message.h:64
mpf_status_code_e
Definition: mpf_message.h:40
Definition: mpf_message.h:52
Definition: mpf_message.h:53
Definition: mpf_message.h:41
Definition: mpf_termination.h:51
Definition: mpf_message.h:36
#define APT_END_EXTERN_C
Definition: apt.h:38
mpf_command_type_e command_id
Definition: mpf_message.h:68
Definition: mpf_message.h:34
mpf_termination_t * termination
Definition: mpf_message.h:75
mpf_status_code_e status_code
Definition: mpf_message.h:70
Definition: mpf_message.h:54
#define APT_BEGIN_EXTERN_C
Definition: apt.h:36
apr_size_t count
Definition: mpf_message.h:85
Definition: mpf_message.h:48
Definition: mpf_message.h:50
mpf_termination_t * assoc_termination
Definition: mpf_message.h:77
Definition: mpf_message.h:83
MPF Types Declarations.
mpf_message_type_e
Definition: mpf_message.h:33
Definition: mpf_message.h:42
Definition: mpf_message.h:35
mpf_message_type_e message_type
Definition: mpf_message.h:66
Definition: mpf_message.h:51
struct mpf_context_t mpf_context_t
Definition: mpf_types.h:42
mpf_command_type_e
Definition: mpf_message.h:47
mpf_context_t * context
Definition: mpf_message.h:73
Definition: mpf_message.h:55
#define MAX_MPF_MESSAGE_COUNT
Definition: mpf_message.h:30
Definition: mpf_message.h:49
void * descriptor
Definition: mpf_message.h:79