Debian Codegraph @

addons/ooh323c/src/ooh323.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2004-2005 by Objective Systems, Inc.
3 *
4 * This software is furnished under an open source license and may be
5 * used and copied only in accordance with the terms of this license.
6 * The text of the license may generally be found in the root
7 * directory of this installation in the COPYING file. It
8 * can also be viewed online at the following URL:
9 *
10 * http://www.obj-sys.com/open/license.html
11 *
12 * Any redistributions of this file including modified versions must
13 * maintain this copyright notice.
14 *
15 *****************************************************************************/
16
17 /**
18 * @file ooh323.h
19 * This file contains functions to support H.225 messages.
20 */
21 #ifndef _OOH323HDR_H_
22 #define _OOH323HDR_H_
23
24 #include "ooasn1.h"
25 #include "ootypes.h"
26 #include "ootrace.h"
27 #include "ooq931.h"
28 #include "MULTIMEDIA-SYSTEM-CONTROL.h"
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #ifndef EXTERN
35 #ifdef MAKE_DLL
36 #define EXTERN __declspec(dllexport)
37 #else
38 #define EXTERN
39 #endif /* MAKE_DLL */
40 #endif /* EXTERN */
41
42 struct OOH323CallData;
43
44 /**
45 * @addtogroup q931
46 * @{
47 */
48 /**
49 * This function is used to process a received SETUP message.
50 * @param call Pointer to call for which SETUP message is received.
51 * @param q931Msg Pointer to the received SETUP message.
52 *
53 * @return OO_OK, on success. OO_FAILED, on failure.
54 */
55 EXTERN int ooOnReceivedSetup
56 (struct OOH323CallData *call, Q931Message *q931Msg);
57
58 /**
59 * This function is used to process a received CONNECT message.
60 * It creates H.245 negotiation channel, and starts TCS and MSD
61 * procedures.
62 * @param call Pointer to call for which CONNECT message is received.
63 * @param q931Msg Pointer to the received q931Msg
64 *
65 * @return OO_OK, on success. OO_FAILED, on failure.
66 */
67 EXTERN int ooOnReceivedSignalConnect
68 (struct OOH323CallData* call, Q931Message *q931Msg);
69
70 /**
71 * This function is used to handle received H.2250 messages. It
72 * calls helper functions based on the type of message received.
73 * @param call Pointer to the call for which a H.2250 message is received
74 * @param q931Msg Pointer to the received q931Msg
75 *
76 * @return OO_OK, on success. OO_FAILED, on failure
77 */
78 EXTERN int ooHandleH2250Message
79 (struct OOH323CallData *call, Q931Message *q931Msg);
80
81 /**
82 * This function is used to process a received Facility message.
83 * @param call Handle to the call for which message has been received.
84 * @param pQ931Msg Pointer the received Facility message.
85 *
86 * @return OO_OK, on success. OO_FAILED, on failure.
87 */
88 EXTERN int ooOnReceivedFacility
89 (struct OOH323CallData *call, Q931Message * pQ931Msg);
90
91 /**
92 * This function is used to process tunneled H245 messages
93 * @param call Handle to the call
94 * @param pH323UUPdu Pointer to the pdu containing tunneled messages.
95 *
96 * @return OO_OK, on success. OO_FAILED, on failure.
97 */
98 EXTERN int ooHandleTunneledH245Messages(struct OOH323CallData *call,
99 H225H323_UU_PDU * pH323UUPdu);
100
101 /**
102 * This is a helper function used to handle an startH245 Facility message.
103 * @param call Handle to the call
104 * @param facility Pointer to the facility message.
105 */
106 EXTERN int ooHandleStartH245FacilityMessage(struct OOH323CallData *call,
107 H225Facility_UUIE *facility);
108
109 /**
110 * This function is used to retrieve the aliases from Sequence of alias
111 * addresses.
112 * @param call Handle to the call.Null when retrieving registered
113 * aliases.
114 * @param pAddresses Pointer to the sequence of alias addresses.
115 * @param aliasList Handle to alias list to be populated with retrieved
116 * aliases.
117 *
118 * @return OO_OK, on success. OO_FAILED, on failure.
119 */
120 EXTERN int ooH323RetrieveAliases
121 (struct OOH323CallData *call, H225_SeqOfH225AliasAddress *pAddresses,
122 OOAliases **aliasList);
123
124 /**
125 */
126 EXTERN int ooPopulatePrefixList(OOCTXT *pctxt, OOAliases *pAliases,
127 H225_SeqOfH225SupportedPrefix *pPrefixList );
128
129 /**
130 * This is a helper function used to populate alias list using aliases.
131 * @param pctxt Pointer to OOCTXT structure which will be used for memory
132 * allocations.
133 * @param pAliases Pointer to aliases to be used for populating list.
134 * @param pAliasList Pointer to alias list to be populated.
135 *
136 * @return OO_OK, on success. OO_FAILED, otherwise.
137 */
138 EXTERN int ooPopulateAliasList(OOCTXT *pctxt, OOAliases *pAliases,
139 H225_SeqOfH225AliasAddress *pAliasList, int pAliasType);
140
141 /**
142 * This function is used to search a particular alias in the alias list. The
143 * search can be on the basis of alias type or value or both.
144 * @param aliasList Handle to the alias list to be searched.
145 * @param type Type of the alias, if search has to consider type as
146 * criterion, otherwise 0.
147 * @param value Value of the alias, if the search has to consider value as
148 * criterion, NULL otherwise.
149 */
150 EXTERN OOAliases* ooH323GetAliasFromList
151 (OOAliases *aliasList, int type, char *value);
152
153 /**
154 * This function is used to add a new alias to alias list.
155 * @param pAliasList Pointer to Alias list.
156 * @param pctxt Pointer to OOCTXT structure to be used for memory
157 * allocation.
158 * @param pAliasAddress New alias address to be added.
159 *
160 * @return Handle to newly added alias or NULL in case of failure.
161 */
162 EXTERN OOAliases* ooH323AddAliasToList
163 (OOAliases **pAliasList, OOCTXT *pctxt, H225AliasAddress *pAliasAddress);
164
165 /**
166 * This function is used to retrieve ip address and port number from an
167 * H225TransportAddress structure.
168 * @param call Handle to the associated call.
169 * @param h225Address Pointer to H225TransportAddress structure
170 * @param ip Pointer to the buffer in which dotted ip address will
171 * be returned.
172 * @param port Pointer to the integer in which port value will be
173 * returned.
174 *
175 * @return OO_OK, on success; OO_FAILED, on failure.
176 */
177 int ooH323GetIpPortFromH225TransportAddress(struct OOH323CallData *call,
178 H225TransportAddress *h225Address, char *ip, int *port);
179 /**
180 * @}
181 */
182 #ifdef __cplusplus
183 }
184 #endif
185
186 #endif