sipXcallLib home page


TaoDefs.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 
12 #ifndef _TaoDefs_h_
13 #define _TaoDefs_h_
14 
15 #include <os/OsIntTypes.h>
16 
17 // Constants
18 #define MAXIMUM_INTEGER_STRING_LENGTH 20
19 #define DEF_TAO_VERY_BIG_NUMBER 2147483647
20 #define DEF_TAO_MSG_MAX_AGR_NUM 128 // default maximum number of argument in a TaoClientMsg
21 #define DEF_TAO_MAX_SOCKET_SIZE 1024
22 #define DEF_TAO_MAX_BUFFER_SIZE 128
23 #define DEF_TAO_MAX_CONNECTION 5 // max number of connection sockets on the
24  // TaoServer transport
25 #define DEF_TAO_LISTEN_PORT 9000
26 #define DEF_TAO_EVENT_PORT 9001
27 #define HTTP_READ_TIMEOUT_MSECS 30000
28 
29 #define TAOMESSAGE_DELIMITER UtlString("$d$")
30 
31 // TYPEDEFS
32 typedef uintptr_t TaoObjHandle;
33 //:An integer that has local meaning for a given TaoServer and represents
34 //:a PTAPI object or a TaoObject.
35 
36 typedef unsigned int IPAddress;
37 //:A 32-bit value that contains an IP address. To convert this value to the a.b.c.d string
38 //:form of an IP address, map the high-order byte to a, the low-order byte to d, and so on.
39 
40 //:Status codes returned by Pingtel API methods
42 {
43  TAO_INVALID=0, // invalid status (not yet set)
44  TAO_SUCCESS, // success
45  TAO_FAILURE, // failure
46 
47  // Name database
48  TAO_IN_USE, // requested object name is already in use
50  TAO_NO_MORE_DATA, // no more data exists
51 
52  // Resource management
53  TAO_DELETED, // object has been deleted
54  TAO_NOT_FOUND, // object not found
55  TAO_NOT_OWNER, // not the owner of the resource
56  TAO_LIMIT_REACHED, // resource limit reached
58  TAO_EXISTS, // resource exists
59 
60  // Synchronization
61  TAO_BUSY, // requested object is locked
63 
64  // Message queues
65  TAO_INVALID_LENGTH, // message is too long for this message queue
67 
68  // Event Management
69  TAO_ALREADY_SIGNALED, // attempt to signal an already signaled event
70  TAO_NOT_SIGNALED, // attempt to clear a not-yet-signaled event
71 
72  // Scheduling
73  TAO_INVALID_PRIORITY, // you requested an invalid priority level
74  TAO_NO_TASK_READY, // no task ready (when attempting to yield
75  // the remainder of a time slice)
76  // Task Management
77  TAO_TASK_NOT_STARTED, // task has not yet been started (or has been
78  // shut down)
79  // Memory Management
80  TAO_NO_MEMORY, // memory allocation error
81 
82  // Other
83  TAO_INVALID_ARGUMENT, // invalid argument to subroutine
84  TAO_NOT_YET_IMPLEMENTED, // coming soon ...
86  TAO_UNSPECIFIED // unspecified error
87 };
88 
89 // TaoObjTypes defined for Tao objects or PTAPI objects
91 {
93  TAO_OBJECT, // the Tao objects
94  PTAPI_OBJECT // PTAPI objects
95 };
96 
97 // TaoObjSubTypes categories defined for use by the TaoObjectMap object
99 {
100  TAO_SERVER, // the TaoServer object
101  TAO_CLIENT, // the TaoClient object
102  TAO_MESSAGE, // the TaoMessage object
103  TAO_MSGQ, // the TaoMsgQ object
104  TAO_TRANSPORT, // the TaoTransport object
105  TAO_CONNECTLISTENER // the TaoConnectionListener object
106 };
107 
108 // PtObjSubTypes categories defined for use by the TaoObjectMap object
110 {
111  PTAPI_PROVIDER, // PtProvider
112  PTAPI_ADDRESS, // PtAddress
113  PTAPI_TERMINAL, // PtTerminal
114  PTAPI_CALL, // PtCall
115  PTAPI_CALLLISTENER, // PtCallListener
116  PTAPI_CONNECT // PtConnection
117 };
118 
119 
120 #endif // _TaoDefs_h_
TaoObjTypes
Definition: TaoDefs.h:90
TaoObjSubTypes
Definition: TaoDefs.h:98
Definition: TaoDefs.h:100
Definition: TaoDefs.h:62
Definition: TaoDefs.h:77
Definition: TaoDefs.h:83
Definition: TaoDefs.h:86
PtObjSubTypes
Definition: TaoDefs.h:109
unsigned int IPAddress
Definition: TaoDefs.h:36
Definition: TaoDefs.h:45
Definition: TaoDefs.h:44
Definition: TaoDefs.h:58
Definition: TaoDefs.h:54
Definition: TaoDefs.h:65
Definition: TaoDefs.h:92
Definition: TaoDefs.h:55
Definition: TaoDefs.h:94
Definition: TaoDefs.h:48
Definition: TaoDefs.h:73
Definition: TaoDefs.h:115
Definition: TaoDefs.h:93
Definition: TaoDefs.h:56
Definition: TaoDefs.h:74
Definition: TaoDefs.h:114
Definition: TaoDefs.h:50
Definition: TaoDefs.h:69
Definition: TaoDefs.h:105
Definition: TaoDefs.h:70
Definition: TaoDefs.h:85
Definition: TaoDefs.h:80
Definition: TaoDefs.h:103
Definition: TaoDefs.h:112
Definition: TaoDefs.h:116
TaoStatus
Definition: TaoDefs.h:41
Definition: TaoDefs.h:104
Definition: TaoDefs.h:84
Definition: TaoDefs.h:61
uintptr_t TaoObjHandle
Definition: TaoDefs.h:32
Definition: TaoDefs.h:101
Definition: TaoDefs.h:111
Definition: TaoDefs.h:66
Definition: TaoDefs.h:43
Definition: TaoDefs.h:49
Definition: TaoDefs.h:113
Definition: TaoDefs.h:53
Definition: TaoDefs.h:102
Definition: TaoDefs.h:57