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 #ifndef __OPAL_SVCCTRL_H
00031 #define __OPAL_SVCCTRL_H
00032
00033 #ifdef P_USE_PRAGMA
00034 #pragma interface
00035 #endif
00036
00037
00038 class H225_ServiceControlDescriptor;
00039 class H225_ServiceControlIndication;
00040 class H225_ServiceControlResponse;
00041
00042 class H248_SignalsDescriptor;
00043 class H248_SignalRequest;
00044
00045 class H323EndPoint;
00046 class H323Connection;
00047
00048
00050
00054 class H323ServiceControlSession : public PObject
00055 {
00056 PCLASSINFO(H323ServiceControlSession, PObject);
00057 public:
00062 H323ServiceControlSession();
00064
00072 virtual PBoolean IsValid() const = 0;
00073
00081 virtual PString GetServiceControlType() const;
00082
00090 virtual PBoolean OnReceivedPDU(
00091 const H225_ServiceControlDescriptor & descriptor
00092 ) = 0;
00093
00101 virtual PBoolean OnSendingPDU(
00102 H225_ServiceControlDescriptor & descriptor
00103 ) const = 0;
00104
00105 enum ChangeType {
00106 OpenSession,
00107 RefreshSession,
00108 CloseSession
00109 };
00110
00115 virtual void OnChange(
00116 unsigned type,
00117 unsigned sessionId,
00118 H323EndPoint & endpoint,
00119 H323Connection * connection
00120 ) const = 0;
00122 };
00123
00124
00128 class H323HTTPServiceControl : public H323ServiceControlSession
00129 {
00130 PCLASSINFO(H323HTTPServiceControl, H323ServiceControlSession);
00131 public:
00136 H323HTTPServiceControl(
00137 const PString & url
00138 );
00139
00142 H323HTTPServiceControl(
00143 const H225_ServiceControlDescriptor & contents
00144 );
00146
00154 virtual PBoolean IsValid() const;
00155
00163 virtual PString GetServiceControlType() const;
00164
00170 virtual PBoolean OnReceivedPDU(
00171 const H225_ServiceControlDescriptor & contents
00172 );
00173
00179 virtual PBoolean OnSendingPDU(
00180 H225_ServiceControlDescriptor & contents
00181 ) const;
00182
00187 virtual void OnChange(
00188 unsigned type,
00189 unsigned sessionId,
00190 H323EndPoint & endpoint,
00191 H323Connection * connection
00192 ) const;
00194
00195 protected:
00196 PString url;
00197 };
00198
00199
00202 class H323H248ServiceControl : public H323ServiceControlSession
00203 {
00204 PCLASSINFO(H323H248ServiceControl, H323ServiceControlSession);
00205 public:
00210 H323H248ServiceControl();
00211
00214 H323H248ServiceControl(
00215 const H225_ServiceControlDescriptor & contents
00216 );
00218
00227 virtual PBoolean OnReceivedPDU(
00228 const H225_ServiceControlDescriptor & contents
00229 );
00230
00237 virtual PBoolean OnSendingPDU(
00238 H225_ServiceControlDescriptor & contents
00239 ) const;
00240
00247 virtual PBoolean OnReceivedPDU(
00248 const H248_SignalsDescriptor & descriptor
00249 );
00250
00257 virtual PBoolean OnSendingPDU(
00258 H248_SignalsDescriptor & descriptor
00259 ) const;
00260
00266 virtual PBoolean OnReceivedPDU(
00267 const H248_SignalRequest & request
00268 ) = 0;
00269
00275 virtual PBoolean OnSendingPDU(
00276 H248_SignalRequest & request
00277 ) const = 0;
00279 };
00280
00281
00284 class H323CallCreditServiceControl : public H323ServiceControlSession
00285 {
00286 PCLASSINFO(H323CallCreditServiceControl, H323ServiceControlSession);
00287 public:
00292 H323CallCreditServiceControl(
00293 const PString & amount,
00294 PBoolean mode,
00295 unsigned duration = 0
00296 );
00297
00300 H323CallCreditServiceControl(
00301 const H225_ServiceControlDescriptor & contents
00302 );
00304
00312 virtual PBoolean IsValid() const;
00313
00319 virtual PBoolean OnReceivedPDU(
00320 const H225_ServiceControlDescriptor & contents
00321 );
00322
00328 virtual PBoolean OnSendingPDU(
00329 H225_ServiceControlDescriptor & contents
00330 ) const;
00331
00337 virtual void OnChange(
00338 unsigned type,
00339 unsigned sessionId,
00340 H323EndPoint & endpoint,
00341 H323Connection * connection
00342 ) const;
00344
00345 protected:
00346 PString amount;
00347 PBoolean mode;
00348 unsigned durationLimit;
00349 };
00350
00351
00352 #endif // __OPAL_SVCCTRL_H
00353
00354