00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef __OPAL_SVCCTRL_H
00035 #define __OPAL_SVCCTRL_H
00036
00037 #ifdef P_USE_PRAGMA
00038 #pragma interface
00039 #endif
00040
00041
00042 class H225_ServiceControlDescriptor;
00043 class H225_ServiceControlIndication;
00044 class H225_ServiceControlResponse;
00045
00046 class H248_SignalsDescriptor;
00047 class H248_SignalRequest;
00048
00049 class H323EndPoint;
00050 class H323Connection;
00051
00052
00054
00058 class H323ServiceControlSession : public PObject
00059 {
00060 PCLASSINFO(H323ServiceControlSession, PObject);
00061 public:
00066 H323ServiceControlSession();
00068
00076 virtual BOOL IsValid() const = 0;
00077
00085 virtual PString GetServiceControlType() const;
00086
00094 virtual BOOL OnReceivedPDU(
00095 const H225_ServiceControlDescriptor & descriptor
00096 ) = 0;
00097
00105 virtual BOOL OnSendingPDU(
00106 H225_ServiceControlDescriptor & descriptor
00107 ) const = 0;
00108
00109 enum ChangeType {
00110 OpenSession,
00111 RefreshSession,
00112 CloseSession
00113 };
00114
00119 virtual void OnChange(
00120 unsigned type,
00121 unsigned sessionId,
00122 H323EndPoint & endpoint,
00123 H323Connection * connection
00124 ) const = 0;
00126 };
00127
00128
00132 class H323HTTPServiceControl : public H323ServiceControlSession
00133 {
00134 PCLASSINFO(H323HTTPServiceControl, H323ServiceControlSession);
00135 public:
00140 H323HTTPServiceControl(
00141 const PString & url
00142 );
00143
00146 H323HTTPServiceControl(
00147 const H225_ServiceControlDescriptor & contents
00148 );
00150
00158 virtual BOOL IsValid() const;
00159
00167 virtual PString GetServiceControlType() const;
00168
00174 virtual BOOL OnReceivedPDU(
00175 const H225_ServiceControlDescriptor & contents
00176 );
00177
00183 virtual BOOL OnSendingPDU(
00184 H225_ServiceControlDescriptor & contents
00185 ) const;
00186
00191 virtual void OnChange(
00192 unsigned type,
00193 unsigned sessionId,
00194 H323EndPoint & endpoint,
00195 H323Connection * connection
00196 ) const;
00198
00199 protected:
00200 PString url;
00201 };
00202
00203
00206 class H323H248ServiceControl : public H323ServiceControlSession
00207 {
00208 PCLASSINFO(H323H248ServiceControl, H323ServiceControlSession);
00209 public:
00214 H323H248ServiceControl();
00215
00218 H323H248ServiceControl(
00219 const H225_ServiceControlDescriptor & contents
00220 );
00222
00231 virtual BOOL OnReceivedPDU(
00232 const H225_ServiceControlDescriptor & contents
00233 );
00234
00241 virtual BOOL OnSendingPDU(
00242 H225_ServiceControlDescriptor & contents
00243 ) const;
00244
00251 virtual BOOL OnReceivedPDU(
00252 const H248_SignalsDescriptor & descriptor
00253 );
00254
00261 virtual BOOL OnSendingPDU(
00262 H248_SignalsDescriptor & descriptor
00263 ) const;
00264
00270 virtual BOOL OnReceivedPDU(
00271 const H248_SignalRequest & request
00272 ) = 0;
00273
00279 virtual BOOL OnSendingPDU(
00280 H248_SignalRequest & request
00281 ) const = 0;
00283 };
00284
00285
00288 class H323CallCreditServiceControl : public H323ServiceControlSession
00289 {
00290 PCLASSINFO(H323CallCreditServiceControl, H323ServiceControlSession);
00291 public:
00296 H323CallCreditServiceControl(
00297 const PString & amount,
00298 BOOL mode,
00299 unsigned duration = 0
00300 );
00301
00304 H323CallCreditServiceControl(
00305 const H225_ServiceControlDescriptor & contents
00306 );
00308
00316 virtual BOOL IsValid() const;
00317
00323 virtual BOOL OnReceivedPDU(
00324 const H225_ServiceControlDescriptor & contents
00325 );
00326
00332 virtual BOOL OnSendingPDU(
00333 H225_ServiceControlDescriptor & contents
00334 ) const;
00335
00341 virtual void OnChange(
00342 unsigned type,
00343 unsigned sessionId,
00344 H323EndPoint & endpoint,
00345 H323Connection * connection
00346 ) const;
00348
00349 protected:
00350 PString amount;
00351 BOOL mode;
00352 unsigned durationLimit;
00353 };
00354
00355
00356 #endif // __OPAL_SVCCTRL_H
00357
00358