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
#ifndef __OPAL_SVCCTRL_H
00032
#define __OPAL_SVCCTRL_H
00033
00034
#ifdef P_USE_PRAGMA
00035
#pragma interface
00036
#endif
00037
00038
00039
class H225_ServiceControlDescriptor;
00040
class H225_ServiceControlIndication;
00041
class H225_ServiceControlResponse;
00042
00043
class H248_SignalsDescriptor;
00044
class H248_SignalRequest;
00045
00046
class H323EndPoint;
00047
class H323Connection;
00048
00049
00051
00055 class H323ServiceControlSession :
public PObject
00056 {
00057 PCLASSINFO(
H323ServiceControlSession, PObject);
00058
public:
00063
H323ServiceControlSession();
00065
00073
virtual BOOL
IsValid()
const = 0;
00074
00082
virtual PString
GetServiceControlType()
const;
00083
00091
virtual BOOL
OnReceivedPDU(
00092
const H225_ServiceControlDescriptor & descriptor
00093 ) = 0;
00094
00102
virtual BOOL
OnSendingPDU(
00103
H225_ServiceControlDescriptor & descriptor
00104 )
const = 0;
00105
00106 enum ChangeType {
00107
OpenSession,
00108
RefreshSession,
00109
CloseSession
00110 };
00111
00116
virtual void OnChange(
00117
unsigned type,
00118
unsigned sessionId,
00119
H323EndPoint & endpoint,
00120
H323Connection * connection
00121 )
const = 0;
00123 };
00124
00125
00129 class H323HTTPServiceControl :
public H323ServiceControlSession
00130 {
00131 PCLASSINFO(
H323HTTPServiceControl,
H323ServiceControlSession);
00132
public:
00137
H323HTTPServiceControl(
00138
const PString &
url
00139 );
00140
00143
H323HTTPServiceControl(
00144
const H225_ServiceControlDescriptor & contents
00145 );
00147
00155
virtual BOOL
IsValid()
const;
00156
00164
virtual PString
GetServiceControlType()
const;
00165
00171
virtual BOOL
OnReceivedPDU(
00172
const H225_ServiceControlDescriptor & contents
00173 );
00174
00180
virtual BOOL
OnSendingPDU(
00181
H225_ServiceControlDescriptor & contents
00182 )
const;
00183
00188
virtual void OnChange(
00189
unsigned type,
00190
unsigned sessionId,
00191
H323EndPoint & endpoint,
00192
H323Connection * connection
00193 )
const;
00195
00196
protected:
00197 PString url;
00198 };
00199
00200
00203 class H323H248ServiceControl :
public H323ServiceControlSession
00204 {
00205 PCLASSINFO(
H323H248ServiceControl,
H323ServiceControlSession);
00206
public:
00211
H323H248ServiceControl();
00212
00215
H323H248ServiceControl(
00216
const H225_ServiceControlDescriptor & contents
00217 );
00219
00228
virtual BOOL
OnReceivedPDU(
00229
const H225_ServiceControlDescriptor & contents
00230 );
00231
00238
virtual BOOL
OnSendingPDU(
00239
H225_ServiceControlDescriptor & contents
00240 )
const;
00241
00248
virtual BOOL OnReceivedPDU(
00249
const H248_SignalsDescriptor & descriptor
00250 );
00251
00258
virtual BOOL OnSendingPDU(
00259
H248_SignalsDescriptor & descriptor
00260 )
const;
00261
00267
virtual BOOL OnReceivedPDU(
00268
const H248_SignalRequest & request
00269 ) = 0;
00270
00276
virtual BOOL OnSendingPDU(
00277
H248_SignalRequest & request
00278 )
const = 0;
00280 };
00281
00282
00285 class H323CallCreditServiceControl :
public H323ServiceControlSession
00286 {
00287 PCLASSINFO(
H323CallCreditServiceControl,
H323ServiceControlSession);
00288
public:
00293
H323CallCreditServiceControl(
00294
const PString &
amount,
00295 BOOL
mode,
00296
unsigned duration = 0
00297 );
00298
00301
H323CallCreditServiceControl(
00302
const H225_ServiceControlDescriptor & contents
00303 );
00305
00313
virtual BOOL
IsValid()
const;
00314
00320
virtual BOOL
OnReceivedPDU(
00321
const H225_ServiceControlDescriptor & contents
00322 );
00323
00329
virtual BOOL
OnSendingPDU(
00330
H225_ServiceControlDescriptor & contents
00331 )
const;
00332
00338
virtual void OnChange(
00339
unsigned type,
00340
unsigned sessionId,
00341
H323EndPoint & endpoint,
00342
H323Connection * connection
00343 )
const;
00345
00346
protected:
00347 PString amount;
00348 BOOL mode;
00349 unsigned durationLimit;
00350 };
00351
00352
00353
#endif // __OPAL_SVCCTRL_H
00354
00355