34 #ifndef OPAL_LIDS_LID_H
35 #define OPAL_LIDS_LID_H
64 virtual PBoolean
Open(
65 const PString & device
70 virtual PBoolean
IsOpen()
const;
74 virtual PBoolean
Close();
117 PBoolean force =
false
137 PBoolean newState =
true
152 unsigned flashTime = 200
172 DWORD * cadence = NULL
195 const unsigned * pattern = NULL,
196 unsigned frequency = 400
242 PBoolean checkForWink =
true
389 PBoolean enable =
true
503 PBoolean full =
false
529 const PString & idString
611 unsigned timeout = 3000
619 unsigned timeout = 3000
647 const PString & description
666 const unsigned * onTimes,
667 const unsigned * offTimes
728 const PString & number,
745 unsigned winkDuration
827 const PString & countryName
839 const PString & filename
854 const PString & filename
881 const PString & type,
882 void * parameters = NULL
890 const PString & descriptor,
891 void * parameters = NULL
936 const char * userToken = NULL
965 PBoolean force =
false
992 unsigned flashTime = 200
993 ) {
return device.
HookFlash(lineNumber, flashTime); }
1011 DWORD * cadence = NULL
1018 DWORD * cadence = NULL
1040 const unsigned * pattern = NULL,
1041 unsigned frequency = 400
1042 ) {
return device.
RingLine(lineNumber, nCadence, pattern, frequency); }
1131 ) {
return device.
ReadFrame(lineNumber, buf, count); }
1139 ) {
return device.
WriteFrame(lineNumber, buf, count, written); }
1147 ) {
return device.
ReadBlock(lineNumber, buf, count); }
1154 ) {
return device.
WriteBlock(lineNumber, buf, count); }
1167 PBoolean enable =
true
1168 ) {
return device.
EnableAudio(lineNumber, enable); }
1222 ) {
return device.
SetAEC(lineNumber, level); }
1235 ) {
return device.
SetVAD(lineNumber, enable); }
1253 PBoolean full =
false
1254 ) {
return device.
GetCallerID(lineNumber, idString, full); }
1278 const PString & idString
1279 ) {
return device.
SetCallerID(lineNumber, idString); }
1292 const char * digits,
1295 ) {
return device.
PlayDTMF(lineNumber, digits, onTime, offTime); }
1319 PBoolean removeTones
1330 unsigned timeout = 3000
1337 unsigned timeout = 3000
1338 ) {
return device.
WaitForTone(lineNumber, tone, timeout); }
1344 ) {
return device.
PlayTone(lineNumber, tone); }
1371 const PString & number,
1373 ) {
return device.
DialOut(lineNumber, number, params); }
1451 #define OPAL_REGISTER_LID_FUNCTION(cls, type, param) \
1452 static class cls##_Registration : public OpalLIDRegistration { \
1454 cls##_Registration() : OpalLIDRegistration(type) { } \
1455 OpalLineInterfaceDevice * Create(void * param) const; \
1456 } instance_##cls##_Registration; \
1457 OpalLineInterfaceDevice * cls##_Registration::Create(void * param) const
1459 #ifndef OPAL_NO_PARAM
1460 #define OPAL_NO_PARAM
1463 #define OPAL_REGISTER_LID(cls, type) \
1464 OPAL_REGISTER_LID_FUNCTION(cls, type, OPAL_NO_PARAM) \
1467 #define OPAL_REGISTER_LID_PARAM(cls, type) \
1468 OPAL_REGISTER_LID_FUNCTION(cls, type, parameter) \
1469 { return new cls(parameter); }
1473 #endif // OPAL_LIDS_LID_H