📄 tapidescribe.cpp
字号:
result.Empty();
if (DeviceState == 0) result += "None";
if (DeviceState & LINEDEVSTATE_OTHER) result += "Other ";
if (DeviceState & LINEDEVSTATE_RINGING) result += "Ringing ";
if (DeviceState & LINEDEVSTATE_CONNECTED) result += "Connected ";
if (DeviceState & LINEDEVSTATE_DISCONNECTED) result += "Disconnected ";
if (DeviceState & LINEDEVSTATE_MSGWAITON) result += "MsgWaitOn ";
if (DeviceState & LINEDEVSTATE_MSGWAITOFF) result += "MsgWaitOff ";
if (DeviceState & LINEDEVSTATE_NUMCOMPLETIONS) result += "NumCompletions ";
if (DeviceState & LINEDEVSTATE_INSERVICE) result += "InService ";
if (DeviceState & LINEDEVSTATE_OUTOFSERVICE) result += "OutOfService ";
if (DeviceState & LINEDEVSTATE_MAINTENANCE) result += "Maintenance ";
if (DeviceState & LINEDEVSTATE_OPEN) result += "Open ";
if (DeviceState & LINEDEVSTATE_CLOSE) result += "Close ";
if (DeviceState & LINEDEVSTATE_NUMCALLS) result += "NumCalls ";
if (DeviceState & LINEDEVSTATE_TERMINALS) result += "Terminals ";
if (DeviceState & LINEDEVSTATE_ROAMMODE) result += "RoamMode ";
if (DeviceState & LINEDEVSTATE_BATTERY) result += "Battery ";
if (DeviceState & LINEDEVSTATE_SIGNAL) result += "Signal ";
if (DeviceState & LINEDEVSTATE_DEVSPECIFIC) result += "DevSpecific ";
if (DeviceState & LINEDEVSTATE_REINIT) result += "ReInit ";
if (DeviceState & LINEDEVSTATE_LOCK) result += "Lock ";
if (DeviceState & LINEDEVSTATE_CAPSCHANGE) result += "CapsChange ";
if (DeviceState & LINEDEVSTATE_CONFIGCHANGE) result += "ConfigChange ";
if (DeviceState & LINEDEVSTATE_TRANSLATECHANGE) result += "TranslateChange ";
if (DeviceState & LINEDEVSTATE_COMPLCANCEL) result += "ComplCancel ";
if (DeviceState & LINEDEVSTATE_REMOVED) result += "Removed ";
if (result.IsEmpty()) result += "??? ";
return LPCTSTR(result);
}
// ----------------------------------------------------------------------------
// Describe details about an address state (in English)
LPCTSTR DescribeAddressStatus(CString &result, DWORD AddressState)
{
result.Empty();
if (AddressState == 0) result += "None";
if (AddressState & LINEADDRESSSTATE_OTHER) result += "Other ";
if (AddressState & LINEADDRESSSTATE_DEVSPECIFIC) result += "DeviceSpecific ";
if (AddressState & LINEADDRESSSTATE_INUSEZERO) result += "InUseZero "; // Address is idle
if (AddressState & LINEADDRESSSTATE_INUSEONE) result += "InUseOne ";
if (AddressState & LINEADDRESSSTATE_INUSEMANY) result += "InUseMany ";
if (AddressState & LINEADDRESSSTATE_NUMCALLS) result += "NumCalls ";
if (AddressState & LINEADDRESSSTATE_FORWARD) result += "Forward ";
if (AddressState & LINEADDRESSSTATE_TERMINALS) result += "Terminals ";
if (AddressState & LINEADDRESSSTATE_CAPSCHANGE) result += "CapsChange ";
if (result.IsEmpty()) result += "??? ";
return LPCTSTR(result);
}
// ----------------------------------------------------------------------------
// Describe details about call information (in English)
LPCTSTR DescribeCallInfo(CString &result, DWORD CallInfoState)
{
result.Empty();
if (CallInfoState == 0) result += "None";
if (CallInfoState & LINECALLINFOSTATE_OTHER) result += "Other ";
if (CallInfoState & LINECALLINFOSTATE_DEVSPECIFIC) result += "DevSpecific ";
if (CallInfoState & LINECALLINFOSTATE_BEARERMODE) result += "BearerMode ";
if (CallInfoState & LINECALLINFOSTATE_RATE) result += "Rate ";
if (CallInfoState & LINECALLINFOSTATE_MEDIAMODE) result += "MediaMode ";
if (CallInfoState & LINECALLINFOSTATE_APPSPECIFIC) result += "AppSpecific ";
if (CallInfoState & LINECALLINFOSTATE_CALLID) result += "CallID ";
if (CallInfoState & LINECALLINFOSTATE_RELATEDCALLID) result += "RelatedCallID ";
if (CallInfoState & LINECALLINFOSTATE_ORIGIN) result += "Origin ";
if (CallInfoState & LINECALLINFOSTATE_REASON) result += "Reason ";
if (CallInfoState & LINECALLINFOSTATE_COMPLETIONID) result += "CompletionID ";
if (CallInfoState & LINECALLINFOSTATE_NUMOWNERINCR) result += "NumOwnerIncr ";
if (CallInfoState & LINECALLINFOSTATE_NUMOWNERDECR) result += "NumOwnerDecr ";
if (CallInfoState & LINECALLINFOSTATE_NUMMONITORS) result += "NumMonitors ";
if (CallInfoState & LINECALLINFOSTATE_TRUNK) result += "Trunk ";
if (CallInfoState & LINECALLINFOSTATE_CALLERID) result += "CallerID ";
if (CallInfoState & LINECALLINFOSTATE_CALLEDID) result += "CalledID ";
if (CallInfoState & LINECALLINFOSTATE_CONNECTEDID) result += "ConnectedID ";
if (CallInfoState & LINECALLINFOSTATE_REDIRECTIONID) result += "RedirectionID ";
if (CallInfoState & LINECALLINFOSTATE_REDIRECTINGID) result += "RedirectingID ";
if (CallInfoState & LINECALLINFOSTATE_DISPLAY) result += "Display ";
if (CallInfoState & LINECALLINFOSTATE_USERUSERINFO) result += "UserUserInfo ";
if (CallInfoState & LINECALLINFOSTATE_HIGHLEVELCOMP) result += "HighLevelComp ";
if (CallInfoState & LINECALLINFOSTATE_LOWLEVELCOMP) result += "LowLevelComp ";
if (CallInfoState & LINECALLINFOSTATE_CHARGINGINFO) result += "ChargingInfo ";
if (CallInfoState & LINECALLINFOSTATE_TERMINAL) result += "Terminal ";
if (CallInfoState & LINECALLINFOSTATE_DIALPARAMS) result += "DialParams ";
if (CallInfoState & LINECALLINFOSTATE_MONITORMODES) result += "MonitorModes ";
if (CallInfoState & LINECALLINFOSTATE_TREATMENT) result += "Treatment ";
if (CallInfoState & LINECALLINFOSTATE_QOS) result += "QOS ";
if (CallInfoState & LINECALLINFOSTATE_CALLDATA) result += "CallData ";
if (result.IsEmpty()) result += "??? ";
return LPCTSTR(result);
}
// ----------------------------------------------------------------------------
// Why was the call made?
LPCTSTR DescribeCallReason(CString& result, DWORD CallReason)
{
result.Empty();
if (CallReason == 0) result += "None";
if (CallReason & LINECALLREASON_DIRECT) result += "Direct ";
if (CallReason & LINECALLREASON_FWDBUSY) result += "FwdBusy ";
if (CallReason & LINECALLREASON_FWDNOANSWER) result += "FwdNoAnswer ";
if (CallReason & LINECALLREASON_FWDUNCOND) result += "FwdUncond ";
if (CallReason & LINECALLREASON_PICKUP) result += "PickUp ";
if (CallReason & LINECALLREASON_UNPARK) result += "UnPark ";
if (CallReason & LINECALLREASON_REDIRECT) result += "Redirect ";
if (CallReason & LINECALLREASON_CALLCOMPLETION) result += "CallCompletion ";
if (CallReason & LINECALLREASON_TRANSFER) result += "Transfer ";
if (CallReason & LINECALLREASON_REMINDER) result += "Reminder ";
if (CallReason & LINECALLREASON_UNKNOWN) result += "Unknown ";
if (CallReason & LINECALLREASON_UNAVAIL) result += "Unavail ";
if (CallReason & LINECALLREASON_INTRUDE) result += "Intrude ";
if (CallReason & LINECALLREASON_PARKED) result += "Parked ";
if (CallReason & LINECALLREASON_CAMPEDON) result += "CampedOn ";
if (CallReason & LINECALLREASON_ROUTEREQUEST) result += "RouteRequest ";
if (result.IsEmpty()) result += "??? ";
return LPCTSTR(result);
}
// ----------------------------------------------------------------------------
// Where was the call from?
LPCTSTR DescribeCallOrigin(CString& result, DWORD CallOrigin)
{
result.Empty();
if (CallOrigin == 0) result += "None";
if (CallOrigin & LINECALLORIGIN_INBOUND) result += "Inbound ";
if (CallOrigin & LINECALLORIGIN_OUTBOUND) result += "Outbound ";
if (CallOrigin & LINECALLORIGIN_INTERNAL) result += "Internal ";
if (CallOrigin & LINECALLORIGIN_EXTERNAL) result += "External ";
if (CallOrigin & LINECALLORIGIN_UNKNOWN) result += "Unknown ";
if (CallOrigin & LINECALLORIGIN_UNAVAIL) result += "Unavail ";
if (CallOrigin & LINECALLORIGIN_CONFERENCE) result += "Conference ";
if (result.IsEmpty()) result += "???";
return LPCTSTR(result);
}
// ----------------------------------------------------------------------------
// Describe details about a device state (in English)
LPCTSTR DescribeCallCompletion(CString &result, DWORD CallCompletion)
{
result.Empty();
if (CallCompletion == 0) result += "None";
if (CallCompletion & LINECALLCOMPLMODE_CAMPON) result += "CampOn ";
if (CallCompletion & LINECALLCOMPLMODE_CALLBACK) result += "CallBack ";
if (CallCompletion & LINECALLCOMPLMODE_INTRUDE) result += "Intrude ";
if (CallCompletion & LINECALLCOMPLMODE_MESSAGE) result += "Message ";
if (result.IsEmpty()) result += "???";
return LPCTSTR(result);
}
// ----------------------------------------------------------------------------
// Describe capabilities of an address on a line
LPCTSTR DescribeAddressCapabilities(CString &result, DWORD AddressCaps)
{
result.Empty();
if (AddressCaps == 0) result += "None";
if (AddressCaps & LINEADDRCAPFLAGS_FWDNUMRINGS) result += "FwdNumRings ";
if (AddressCaps & LINEADDRCAPFLAGS_PICKUPGROUPID) result += "PickupGroupID ";
if (AddressCaps & LINEADDRCAPFLAGS_SECURE) result += "Secure ";
if (AddressCaps & LINEADDRCAPFLAGS_BLOCKIDDEFAULT) result += "BlockIDDefault ";
if (AddressCaps & LINEADDRCAPFLAGS_BLOCKIDOVERRIDE) result += "BlockIDOverride ";
if (AddressCaps & LINEADDRCAPFLAGS_DIALED) result += "Dialed ";
if (AddressCaps & LINEADDRCAPFLAGS_ORIGOFFHOOK) result += "OrigOffHook ";
if (AddressCaps & LINEADDRCAPFLAGS_DESTOFFHOOK) result += "DeskOffHook ";
if (AddressCaps & LINEADDRCAPFLAGS_FWDCONSULT) result += "FwdConsult ";
if (AddressCaps & LINEADDRCAPFLAGS_SETUPCONFNULL) result += "SetupConfNull ";
if (AddressCaps & LINEADDRCAPFLAGS_AUTORECONNECT) result += "AutoReconnect ";
if (AddressCaps & LINEADDRCAPFLAGS_COMPLETIONID) result += "CompletionID ";
if (AddressCaps & LINEADDRCAPFLAGS_TRANSFERHELD) result += "TransferHeld ";
if (AddressCaps & LINEADDRCAPFLAGS_TRANSFERMAKE) result += "TransferMake ";
if (AddressCaps & LINEADDRCAPFLAGS_CONFERENCEHELD) result += "ConferenceHeld ";
if (AddressCaps & LINEADDRCAPFLAGS_CONFERENCEMAKE) result += "ConferenceMake ";
if (AddressCaps & LINEADDRCAPFLAGS_PARTIALDIAL) result += "PartialDial ";
if (AddressCaps & LINEADDRCAPFLAGS_FWDSTATUSVALID) result += "FwdStatusValid ";
if (AddressCaps & LINEADDRCAPFLAGS_FWDINTEXTADDR) result += "FwdIntExtAddr ";
if (AddressCaps & LINEADDRCAPFLAGS_FWDBUSYNAADDR) result += "FwdBusyNAAddr ";
if (AddressCaps & LINEADDRCAPFLAGS_ACCEPTTOALERT) result += "AcceptToAlert ";
if (AddressCaps & LINEADDRCAPFLAGS_CONFDROP) result += "ConfDrop ";
if (AddressCaps & LINEADDRCAPFLAGS_PICKUPCALLWAIT) result += "PickupCallWait ";
if (AddressCaps & LINEADDRCAPFLAGS_PREDICTIVEDIALER) result += "PredictiveDialer ";
if (AddressCaps & LINEADDRCAPFLAGS_QUEUE) result += "Queue ";
if (AddressCaps & LINEADDRCAPFLAGS_ROUTEPOINT) result += "RoutePoint ";
if (AddressCaps & LINEADDRCAPFLAGS_HOLDMAKESNEW) result += "HoldMakesNew ";
if (AddressCaps & LINEADDRCAPFLAGS_NOINTERNALCALLS) result += "NoInternalCalls ";
if (AddressCaps & LINEADDRCAPFLAGS_NOEXTERNALCALLS) result += "NoExternalCalls ";
if (AddressCaps & LINEADDRCAPFLAGS_SETCALLINGID) result += "SetCallingID ";
if (result.IsEmpty()) result += "???";
return LPCTSTR(result);
}
// ----------------------------------------------------------------------------
// Describe capabilities of an address on a line
LPCTSTR DescribeCallFeatures(CString &result, DWORD CallFeatures)
{
result.Empty();
if (CallFeatures == 0) result += "None";
if (CallFeatures & LINECALLFEATURE_ACCEPT) result += "Accept ";
if (CallFeatures & LINECALLFEATURE_ADDTOCONF) result += "AddToConf ";
if (CallFeatures & LINECALLFEATURE_ANSWER) result += "Answer ";
if (CallFeatures & LINECALLFEATURE_BLINDTRANSFER) result += "BlindTransfer ";
if (CallFeatures & LINECALLFEATURE_COMPLETECALL) result += "CompleteCall ";
if (CallFeatures & LINECALLFEATURE_COMPLETETRANSF) result += "CompleteTransf ";
if (CallFeatures & LINECALLFEATURE_DIAL) result += "Dial ";
if (CallFeatures & LINECALLFEATURE_DROP) result += "Drop ";
if (CallFeatures & LINECALLFEATURE_GATHERDIGITS) result += "GatherDigits ";
if (CallFeatures & LINECALLFEATURE_GENERATEDIGITS) result += "GenerateDigits ";
if (CallFeatures & LINECALLFEATURE_GENERATETONE) result += "GenerateTone ";
if (CallFeatures & LINECALLFEATURE_HOLD) result += "Hold ";
if (CallFeatures & LINECALLFEATURE_MONITORDIGITS) result += "MonitorDigits ";
if (CallFeatures & LINECALLFEATURE_MONITORMEDIA) result += "MonitorMedia ";
if (CallFeatures & LINECALLFEATURE_MONITORTONES) result += "MonitorTones ";
if (CallFeatures & LINECALLFEATURE_PARK) result += "Park ";
if (CallFeatures & LINECALLFEATURE_PREPAREADDCONF) result += "PrepareAddConf ";
if (CallFeatures & LINECALLFEATURE_REDIRECT) result += "Redirect ";
if (CallFeatures & LINECALLFEATURE_REMOVEFROMCONF) result += "RemoveFromConf ";
if (CallFeatures & LINECALLFEATURE_SECURECALL) result += "SecureCall ";
if (CallFeatures & LINECALLFEATURE_SENDUSERUSER) result += "SendUserUser ";
if (CallFeatures & LINECALLFEATURE_SETCALLPARAMS) result += "SetCallParams ";
if (CallFeatures & LINECALLFEATURE_SETMEDIACONTROL) result += "SetMediaControl ";
if (CallFeatures & LINECALLFEATURE_SETTERMINAL) result += "SetTerminal ";
if (CallFeatures & LINECALLFEATURE_SETUPCONF) result += "SetupConf ";
if (CallFeatures & LINECALLFEATURE_SETUPTRANSFER) result += "SetupTransfer ";
if (CallFeatures & LINECALLFEATURE_SWAPHOLD) result += "SwapHold ";
if (CallFeatures & LINECALLFEATURE_UNHOLD) result += "Unhold ";
if (CallFeatures & LINECALLFEATURE_RELEASEUSERUSERINFO) result += "ReleaseUserUserInfo ";
if (CallFeatures & LINECALLFEATURE_SETTREATMENT) result += "SetTreatment ";
if (CallFeatures & LINECALLFEATURE_SETQOS) result += "SetQOS ";
if (CallFeatures & LINECALLFEATURE_SETCALLDATA) result += "SetCallData ";
if (result.IsEmpty()) result += "???";
return LPCTSTR(result);
}
// ----------------------------------------------------------------------------
// Describe capabilities of an address on a line
LPCTSTR DescribeCallFeatures2(CString &result, DWORD CallFeatures2)
{
result.Empty();
if (CallFeatures2 == 0) result += " "; // Don't mess up the string
if (CallFeatures2 & LINECALLFEATURE2_NOHOLDCONFERENCE) result += "NoHoldConference ";
if (CallFeatures2 & LINECALLFEATURE2_ONESTEPTRANSFER) result += "OneStepTransfer ";
if (CallFeatures2 & LINECALLFEATURE2_COMPLCAMPON) result += "ComplCampOn ";
if (CallFeatures2 & LINECALLFEATURE2_COMPLCALLBACK) result += "ComplCallBack ";
if (CallFeatures2 & LINECALLFEATURE2_COMPLINTRUDE) result += "ComplIntrude ";
if (CallFeatures2 & LINECALLFEATURE2_COMPLMESSAGE) result += "ComplMessage ";
if (CallFeatures2 & LINECALLFEATURE2_TRANSFERNORM) result += "TransferNorm ";
if (CallFeatures2 & LINECALLFEATURE2_TRANSFERCONF) result += "TransferConf ";
if (CallFeatures2 & LINECALLFEATURE2_PARKDIRECT) result += "ParkDirect ";
if (CallFeatures2 & LINECALLFEATURE2_PARKNONDIRECT) result += "ParkNonDirect ";
if (result.IsEmpty()) result += "???";
return LPCTSTR(result);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -