34 #ifndef OPAL_LIDS_LID_H
35 #define OPAL_LIDS_LID_H
62 virtual PBoolean
Open(
63 const PString & device
68 virtual PBoolean
IsOpen()
const;
72 virtual PBoolean
Close();
115 PBoolean force =
false
135 PBoolean newState =
true
150 unsigned flashTime = 200
170 DWORD * cadence = NULL
193 const unsigned * pattern = NULL,
194 unsigned frequency = 400
240 PBoolean checkForWink =
true
387 PBoolean enable =
true
501 PBoolean full =
false
527 const PString & idString
609 unsigned timeout = 3000
617 unsigned timeout = 3000
645 const PString & description
664 const unsigned * onTimes,
665 const unsigned * offTimes
726 const PString & number,
743 unsigned winkDuration
808 const PString & countryName
820 const PString & filename
835 const PString & filename
862 const PString & type,
863 void * parameters = NULL
871 const PString & descriptor,
872 void * parameters = NULL
917 const char * userToken = NULL
946 PBoolean force =
false
973 unsigned flashTime = 200
974 ) {
return device.
HookFlash(lineNumber, flashTime); }
992 DWORD * cadence = NULL
999 DWORD * cadence = NULL
1021 const unsigned * pattern = NULL,
1022 unsigned frequency = 400
1023 ) {
return device.
RingLine(lineNumber, nCadence, pattern, frequency); }
1112 ) {
return device.
ReadFrame(lineNumber, buf, count); }
1120 ) {
return device.
WriteFrame(lineNumber, buf, count, written); }
1128 ) {
return device.
ReadBlock(lineNumber, buf, count); }
1135 ) {
return device.
WriteBlock(lineNumber, buf, count); }
1148 PBoolean enable =
true
1149 ) {
return device.
EnableAudio(lineNumber, enable); }
1203 ) {
return device.
SetAEC(lineNumber, level); }
1216 ) {
return device.
SetVAD(lineNumber, enable); }
1234 PBoolean full =
false
1235 ) {
return device.
GetCallerID(lineNumber, idString, full); }
1259 const PString & idString
1260 ) {
return device.
SetCallerID(lineNumber, idString); }
1273 const char * digits,
1276 ) {
return device.
PlayDTMF(lineNumber, digits, onTime, offTime); }
1300 PBoolean removeTones
1311 unsigned timeout = 3000
1318 unsigned timeout = 3000
1319 ) {
return device.
WaitForTone(lineNumber, tone, timeout); }
1325 ) {
return device.
PlayTone(lineNumber, tone); }
1352 const PString & number,
1354 ) {
return device.
DialOut(lineNumber, number, params); }
1432 #define OPAL_REGISTER_LID_FUNCTION(cls, type, param) \
1433 static class cls##_Registration : public OpalLIDRegistration { \
1435 cls##_Registration() : OpalLIDRegistration(type) { } \
1436 OpalLineInterfaceDevice * Create(void * param) const; \
1437 } instance_##cls##_Registration; \
1438 OpalLineInterfaceDevice * cls##_Registration::Create(void * param) const
1440 #ifndef OPAL_NO_PARAM
1441 #define OPAL_NO_PARAM
1444 #define OPAL_REGISTER_LID(cls, type) \
1445 OPAL_REGISTER_LID_FUNCTION(cls, type, OPAL_NO_PARAM) \
1448 #define OPAL_REGISTER_LID_PARAM(cls, type) \
1449 OPAL_REGISTER_LID_FUNCTION(cls, type, parameter) \
1450 { return new cls(parameter); }
1453 #endif // OPAL_LIDS_LID_H