svcctrl.h
Go to the documentation of this file.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_H323_SVCCTRL_H
00031 #define OPAL_H323_SVCCTRL_H
00032
00033 #ifdef P_USE_PRAGMA
00034 #pragma interface
00035 #endif
00036
00037 #include <opal/buildopts.h>
00038
00039 #if OPAL_H323
00040
00041 class H225_ServiceControlDescriptor;
00042 class H225_ServiceControlIndication;
00043 class H225_ServiceControlResponse;
00044
00045 class H248_SignalsDescriptor;
00046 class H248_SignalRequest;
00047
00048 class H323EndPoint;
00049 class H323Connection;
00050
00051
00053
00057 class H323ServiceControlSession : public PObject
00058 {
00059 PCLASSINFO(H323ServiceControlSession, PObject);
00060 public:
00065 H323ServiceControlSession();
00067
00075 virtual PBoolean IsValid() const = 0;
00076
00084 virtual PString GetServiceControlType() const;
00085
00093 virtual PBoolean OnReceivedPDU(
00094 const H225_ServiceControlDescriptor & descriptor
00095 ) = 0;
00096
00104 virtual PBoolean OnSendingPDU(
00105 H225_ServiceControlDescriptor & descriptor
00106 ) const = 0;
00107
00108 enum ChangeType {
00109 OpenSession,
00110 RefreshSession,
00111 CloseSession
00112 };
00113
00118 virtual void OnChange(
00119 unsigned type,
00120 unsigned sessionId,
00121 H323EndPoint & endpoint,
00122 H323Connection * connection
00123 ) const = 0;
00125 };
00126
00127
00131 class H323HTTPServiceControl : public H323ServiceControlSession
00132 {
00133 PCLASSINFO(H323HTTPServiceControl, H323ServiceControlSession);
00134 public:
00139 H323HTTPServiceControl(
00140 const PString & url
00141 );
00142
00145 H323HTTPServiceControl(
00146 const H225_ServiceControlDescriptor & contents
00147 );
00149
00157 virtual PBoolean IsValid() const;
00158
00166 virtual PString GetServiceControlType() const;
00167
00173 virtual PBoolean OnReceivedPDU(
00174 const H225_ServiceControlDescriptor & contents
00175 );
00176
00182 virtual PBoolean OnSendingPDU(
00183 H225_ServiceControlDescriptor & contents
00184 ) const;
00185
00190 virtual void OnChange(
00191 unsigned type,
00192 unsigned sessionId,
00193 H323EndPoint & endpoint,
00194 H323Connection * connection
00195 ) const;
00197
00198 protected:
00199 PString url;
00200 };
00201
00202
00205 class H323H248ServiceControl : public H323ServiceControlSession
00206 {
00207 PCLASSINFO(H323H248ServiceControl, H323ServiceControlSession);
00208 public:
00213 H323H248ServiceControl();
00214
00217 H323H248ServiceControl(
00218 const H225_ServiceControlDescriptor & contents
00219 );
00221
00230 virtual PBoolean OnReceivedPDU(
00231 const H225_ServiceControlDescriptor & contents
00232 );
00233
00240 virtual PBoolean OnSendingPDU(
00241 H225_ServiceControlDescriptor & contents
00242 ) const;
00243
00250 virtual PBoolean OnReceivedPDU(
00251 const H248_SignalsDescriptor & descriptor
00252 );
00253
00260 virtual PBoolean OnSendingPDU(
00261 H248_SignalsDescriptor & descriptor
00262 ) const;
00263
00269 virtual PBoolean OnReceivedPDU(
00270 const H248_SignalRequest & request
00271 ) = 0;
00272
00278 virtual PBoolean OnSendingPDU(
00279 H248_SignalRequest & request
00280 ) const = 0;
00282 };
00283
00284
00287 class H323CallCreditServiceControl : public H323ServiceControlSession
00288 {
00289 PCLASSINFO(H323CallCreditServiceControl, H323ServiceControlSession);
00290 public:
00295 H323CallCreditServiceControl(
00296 const PString & amount,
00297 PBoolean mode,
00298 unsigned duration = 0
00299 );
00300
00303 H323CallCreditServiceControl(
00304 const H225_ServiceControlDescriptor & contents
00305 );
00307
00315 virtual PBoolean IsValid() const;
00316
00322 virtual PBoolean OnReceivedPDU(
00323 const H225_ServiceControlDescriptor & contents
00324 );
00325
00331 virtual PBoolean OnSendingPDU(
00332 H225_ServiceControlDescriptor & contents
00333 ) const;
00334
00340 virtual void OnChange(
00341 unsigned type,
00342 unsigned sessionId,
00343 H323EndPoint & endpoint,
00344 H323Connection * connection
00345 ) const;
00347
00350
00351 const PString & GetAmount() const { return amount; }
00352
00354 bool GetMode() const { return mode; }
00355
00357 unsigned GetDurationLimit() const { return durationLimit; }
00359
00360 protected:
00361 PString amount;
00362 bool mode;
00363 unsigned durationLimit;
00364 };
00365
00366
00367 #endif // OPAL_H323
00368
00369 #endif // OPAL_H323_SVCCTRL_H
00370
00371