Debian Codegraph @

addons/ooh323c/src/eventHandler.c

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 #include "asterisk.h"
18 #include "asterisk/lock.h"
19
20 #include "eventHandler.h"
21
22 void setEventHandler (OOCTXT* pctxt, EventHandler* pHandler)
23 {
24 pctxt->pEventHandler = pHandler;
25 }
26
27 void removeEventHandler (OOCTXT* pctxt)
28 {
29 pctxt->pEventHandler = 0;
30 }
31
32 void invokeStartElement (OOCTXT* pctxt, const char* name, int index)
33 {
34 if (0 != pctxt->pEventHandler) {
35 pctxt->pEventHandler->startElement (name, index);
36 }
37 }
38
39 void invokeEndElement (OOCTXT* pctxt, const char* name, int index)
40 {
41 if (0 != pctxt->pEventHandler) {
42 pctxt->pEventHandler->endElement (name, index);
43 }
44 }
45
46 void invokeBoolValue (OOCTXT* pctxt, ASN1BOOL value)
47 {
48 if (0 != pctxt->pEventHandler) {
49 pctxt->pEventHandler->boolValue (value);
50 }
51 }
52
53 void invokeIntValue (OOCTXT* pctxt, ASN1INT value)
54 {
55 if (0 != pctxt->pEventHandler) {
56 pctxt->pEventHandler->intValue (value);
57 }
58 }
59
60 void invokeUIntValue (OOCTXT* pctxt, ASN1UINT value)
61 {
62 if (0 != pctxt->pEventHandler) {
63 pctxt->pEventHandler->uIntValue (value);
64 }
65 }
66
67 void invokeBitStrValue (OOCTXT* pctxt, ASN1UINT numbits,
68 const ASN1OCTET* data)
69 {
70 if (0 != pctxt->pEventHandler) {
71 pctxt->pEventHandler->bitStrValue (numbits, data);
72 }
73 }
74
75 void invokeOctStrValue (OOCTXT* pctxt, ASN1UINT numocts,
76 const ASN1OCTET* data)
77 {
78 if (0 != pctxt->pEventHandler) {
79 pctxt->pEventHandler->octStrValue (numocts, data);
80 }
81 }
82
83 void invokeCharStrValue (OOCTXT* pctxt, const char* value)
84 {
85 if (0 != pctxt->pEventHandler) {
86 pctxt->pEventHandler->charStrValue (value);
87 }
88 }
89
90 void invokeCharStr16BitValue (OOCTXT* pctxt, ASN1UINT nchars,
91 ASN116BITCHAR* data)
92 {
93 if (0 != pctxt->pEventHandler) {
94 pctxt->pEventHandler->charStr16BitValue (nchars, data);
95 }
96 }
97
98 void invokeNullValue (OOCTXT* pctxt)
99 {
100 if (0 != pctxt->pEventHandler) {
101 pctxt->pEventHandler->nullValue ();
102 }
103 }
104
105 void invokeOidValue (OOCTXT* pctxt, ASN1UINT numSubIds, ASN1UINT* pSubIds)
106 {
107 if (0 != pctxt->pEventHandler) {
108 pctxt->pEventHandler->oidValue (numSubIds, pSubIds);
109 }
110 }
111
112 void invokeEnumValue (OOCTXT* pctxt, ASN1UINT value)
113 {
114 if (0 != pctxt->pEventHandler) {
115 pctxt->pEventHandler->enumValue (value);
116 }
117 }
118
119 void invokeOpenTypeValue (OOCTXT* pctxt, ASN1UINT numocts,
120 const ASN1OCTET* data)
121 {
122 if (0 != pctxt->pEventHandler) {
123 pctxt->pEventHandler->openTypeValue (numocts, data);
124 }
125 }