📄 tapicom.hpp
字号:
// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved
// (DO NOT EDIT: machine generated header) 'Tapicom.pas' rev: 10.00
#ifndef TapicomHPP
#define TapicomHPP
#pragma delphiheader begin
#pragma option push
#pragma option -w- // All warnings off
#pragma option -Vx // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp> // Pascal unit
#include <Sysinit.hpp> // Pascal unit
#include <Windows.hpp> // Pascal unit
#include <Classes.hpp> // Pascal unit
#include <Sysutils.hpp> // Pascal unit
#include <Connect.hpp> // Pascal unit
#include <Commconnect.hpp> // Pascal unit
#include <Tapi.hpp> // Pascal unit
#include <Forms.hpp> // Pascal unit
//-- user supplied -----------------------------------------------------------
namespace Tapicom
{
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TCallback)(System::TObject* Sender, bool aBusy);
typedef void __fastcall (__closure *TTAPIHandleCallback)(unsigned aDevice, unsigned aMessage, unsigned aInstance, unsigned aParam1, unsigned aParam2, unsigned aParam3);
typedef void __fastcall (__closure *THandleCallback)(unsigned aDevice, unsigned aMessage, unsigned aParam1, unsigned aParam2, unsigned aParam3);
class DELPHICLASS TTAPILine;
class DELPHICLASS TLineCom;
class PASCALIMPLEMENTATION TTAPILine : public Connect::TConnection
{
typedef Connect::TConnection inherited;
public:
TLineCom* operator[](int Index) { return Lines[Index]; }
private:
Classes::TList* FList;
#pragma pack(push,1)
Tapi::HLINEAPP__ FLineApp;
#pragma pack(pop)
int FNumDevs;
bool FKeepConnection;
TTAPIHandleCallback FOnHandleCallback;
void __fastcall CloseAll(void);
int __fastcall GetCount(void);
TLineCom* __fastcall GetLine(int Index);
AnsiString __fastcall GetLineName(unsigned aDeviceId);
unsigned __fastcall GetAPIVersion(unsigned aDeviceId);
AnsiString __fastcall GetDevConfig(unsigned aDeviceId);
void __fastcall SetDevConfig(unsigned aDeviceId, const AnsiString Value);
protected:
virtual void __fastcall OpenConn(void);
virtual void __fastcall CloseConn(void);
virtual void __fastcall HandleCallback(unsigned aDevice, unsigned aMessage, unsigned aInstance, unsigned aParam1, unsigned aParam2, unsigned aParam3);
public:
__property Tapi::HLINEAPP__ LineApp = {read=FLineApp};
__property int NumDevs = {read=FNumDevs, nodefault};
__fastcall virtual TTAPILine(Classes::TComponent* aOwner);
__fastcall virtual ~TTAPILine(void);
void __fastcall AddLine(TLineCom* aLine);
void __fastcall RemoveLine(TLineCom* aLine);
void __fastcall ShowConfigDialog(unsigned aDeviceId);
void __fastcall ShowTranslateDialog(unsigned aDeviceId, AnsiString aPhoneNumber);
unsigned __fastcall FindDeviceId(const AnsiString aDeviceName);
__property int Count = {read=GetCount, nodefault};
__property TLineCom* Lines[int Index] = {read=GetLine/*, default*/};
__property AnsiString LineNames[unsigned aDeviceId] = {read=GetLineName};
__property unsigned APIVersions[unsigned aDeviceId] = {read=GetAPIVersion};
__property AnsiString DevConfig[unsigned aDeviceId] = {read=GetDevConfig, write=SetDevConfig};
__published:
__property bool KeepConnection = {read=FKeepConnection, write=FKeepConnection, nodefault};
__property TTAPIHandleCallback OnHandleCallback = {read=FOnHandleCallback, write=FOnHandleCallback};
};
typedef void __fastcall (__closure *TCallOffering)(System::TObject* Sender, bool &aAnswer);
typedef void __fastcall (__closure *TStateChange)(System::TObject* Sender, unsigned aParam1, unsigned aParam2);
class DELPHICLASS TLineCommHandle;
class PASCALIMPLEMENTATION TLineCommHandle : public Commconnect::TCommHandle
{
typedef Commconnect::TCommHandle inherited;
private:
TLineCom* FLineCom;
protected:
virtual void __fastcall DoAfterOpen(void);
virtual void __fastcall DoAfterClose(void);
public:
#pragma option push -w-inl
/* TCommHandle.Create */ inline __fastcall virtual TLineCommHandle(Classes::TComponent* AOwner) : Commconnect::TCommHandle(AOwner) { }
#pragma option pop
#pragma option push -w-inl
/* TCommHandle.Destroy */ inline __fastcall virtual ~TLineCommHandle(void) { }
#pragma option pop
};
class PASCALIMPLEMENTATION TLineCom : public Connect::TConnection
{
typedef Connect::TConnection inherited;
private:
unsigned FDeviceId;
#pragma pack(push,1)
Tapi::HLINE__ FLine;
#pragma pack(pop)
#pragma pack(push,1)
Tapi::HCALL__ FCall;
#pragma pack(pop)
unsigned FhCommDev;
AnsiString FPhoneNumber;
TCallOffering FOnCallOffering;
THandleCallback FOnHandleCallback;
Classes::TNotifyEvent FOnConnect;
Classes::TNotifyEvent FOnDisconnect;
Classes::TNotifyEvent FOnCallAnswering;
TStateChange FOnStateChange;
TLineCommHandle* FComm;
bool FDirectAccess;
unsigned FRequestAnswer;
unsigned FRequestMakeCall;
unsigned FRequestDrop;
void __fastcall SetDeviceId(unsigned Value);
void __fastcall CheckDeviceId(void);
Tapi::HLINEAPP__ __fastcall GetLineApp(void);
unsigned __fastcall GetAPIVersion(void);
bool __fastcall GetConnected(void);
void __fastcall SetPhoneNumber(const AnsiString Value);
void __fastcall SetDirectAccess(bool Value);
AnsiString __fastcall GetTranslatedPhoneNumber();
AnsiString __fastcall GetDevConfig();
void __fastcall SetDevConfig(const AnsiString Value);
bool __fastcall GetIsMakingCall(void);
bool __fastcall GetIsDropping(void);
bool __fastcall GetIsAnswering(void);
protected:
virtual void __fastcall OpenConn(void);
virtual void __fastcall CloseConn(void);
virtual void __fastcall HandleCallback(unsigned aDevice, unsigned aMessage, unsigned aParam1, unsigned aParam2, unsigned aParam3);
void __fastcall CheckConnected(void);
void __fastcall CheckDisconnected(void);
public:
__fastcall virtual TLineCom(Classes::TComponent* aOwner);
__fastcall virtual ~TLineCom(void);
void __fastcall ShowTranslateDialog(void);
void __fastcall MakeCall(void);
void __fastcall Drop(void);
__property Tapi::HLINEAPP__ LineApp = {read=GetLineApp};
__property unsigned DeviceId = {read=FDeviceId, write=SetDeviceId, nodefault};
__property unsigned APIVersion = {read=GetAPIVersion, nodefault};
__property Tapi::HLINE__ Line = {read=FLine};
__property Tapi::HCALL__ Call = {read=FCall};
__property AnsiString TranslatedPhoneNumber = {read=GetTranslatedPhoneNumber};
__property TLineCommHandle* Comm = {read=FComm};
__property bool IsMakingCall = {read=GetIsMakingCall, nodefault};
__property bool IsDropping = {read=GetIsDropping, nodefault};
__property bool IsAnswering = {read=GetIsAnswering, nodefault};
__property AnsiString DevConfig = {read=GetDevConfig, write=SetDevConfig};
__published:
__property bool Connected = {read=GetConnected, nodefault};
__property bool DirectAccess = {read=FDirectAccess, write=SetDirectAccess, nodefault};
__property AnsiString PhoneNumber = {read=FPhoneNumber, write=SetPhoneNumber};
__property TCallOffering OnCallOffering = {read=FOnCallOffering, write=FOnCallOffering};
__property THandleCallback OnHandleCallback = {read=FOnHandleCallback, write=FOnHandleCallback};
__property Classes::TNotifyEvent OnConnect = {read=FOnConnect, write=FOnConnect};
__property Classes::TNotifyEvent OnDisconnect = {read=FOnDisconnect, write=FOnDisconnect};
__property Classes::TNotifyEvent OnCallAnswering = {read=FOnCallAnswering, write=FOnCallAnswering};
__property TStateChange OnStateChange = {read=FOnStateChange, write=FOnStateChange};
};
//-- var, const, procedure ---------------------------------------------------
static const int TAPIHiVer = 0x20000;
static const int TAPILoVer = 0x10004;
#define TapiCallbacks (Set<Byte, 0, 255> () << 0xd << 0x13 << 0x19 )
#define CallCallbacks (Set<Byte, 0, 255> () << 0x0 << 0x3 << 0x8 << 0x15 << 0x16 << 0x17 << 0x18 )
#define LineCallbacks (Set<Byte, 0, 255> () << 0x1 << 0x2 << 0x6 << 0x7 << 0x9 << 0xa << 0xb )
#define NoDeviceCallbacks (Set<Byte, 0, 255> () << 0xc )
extern PACKAGE TTAPILine* TAPILine;
extern PACKAGE System::ResourceString _stUnknownLineCallState;
#define Tapicom_stUnknownLineCallState System::LoadResourceString(&Tapicom::_stUnknownLineCallState)
extern PACKAGE System::ResourceString _stUndefinedLineCallStateInfo;
#define Tapicom_stUndefinedLineCallStateInfo System::LoadResourceString(&Tapicom::_stUndefinedLineCallStateInfo)
extern PACKAGE System::ResourceString _errBadDeviceId;
#define Tapicom_errBadDeviceId System::LoadResourceString(&Tapicom::_errBadDeviceId)
extern PACKAGE System::ResourceString _errCallInProcess;
#define Tapicom_errCallInProcess System::LoadResourceString(&Tapicom::_errCallInProcess)
extern PACKAGE System::ResourceString _errNotConnected;
#define Tapicom_errNotConnected System::LoadResourceString(&Tapicom::_errNotConnected)
extern PACKAGE System::ResourceString _errNotDisconnected;
#define Tapicom_errNotDisconnected System::LoadResourceString(&Tapicom::_errNotDisconnected)
extern PACKAGE System::ResourceString _errVerifyUsable;
#define Tapicom_errVerifyUsable System::LoadResourceString(&Tapicom::_errVerifyUsable)
extern PACKAGE System::ResourceString _errLineIsAlreadyUsed;
#define Tapicom_errLineIsAlreadyUsed System::LoadResourceString(&Tapicom::_errLineIsAlreadyUsed)
extern PACKAGE System::ResourceString _errNotEnoughMemory;
#define Tapicom_errNotEnoughMemory System::LoadResourceString(&Tapicom::_errNotEnoughMemory)
extern PACKAGE System::ResourceString _stLineUnavail;
#define Tapicom_stLineUnavail System::LoadResourceString(&Tapicom::_stLineUnavail)
extern PACKAGE System::ResourceString _stLineUnnamed;
#define Tapicom_stLineUnnamed System::LoadResourceString(&Tapicom::_stLineUnnamed)
extern PACKAGE System::ResourceString _stLineNameEmpty;
#define Tapicom_stLineNameEmpty System::LoadResourceString(&Tapicom::_stLineNameEmpty)
extern PACKAGE void * __fastcall GetTapiMem(int aSize);
extern PACKAGE AnsiString __fastcall LineCallStateToStr(unsigned CallState);
extern PACKAGE AnsiString __fastcall LineCallStateInfoToStr(unsigned CallState, unsigned Info);
extern PACKAGE void __fastcall Register(void);
} /* namespace Tapicom */
using namespace Tapicom;
#pragma pack(pop)
#pragma option pop
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // Tapicom
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -