Platforms to show: All Mac Windows Linux Cross-Platform
Required plugins for this example: MBS Win Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Win/TAPI/TAPI
This example is the version from Sat, 24th Oct 2014.
Project "TAPI.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
EventHandler Sub Open()
'if not TAPIMBS.Available then
'log "TAPI is only for Windows."
'Return
'end if
tapi = new MyTAPIMBS
dim addresses() as ITAddressMBS = tapi.Addresses
for each a as ITAddressMBS in Addresses
log a.AddressName+" ("+a.ServiceProviderName+"): "+a.DialableAddress
next
tapi.ListenOnAllAddresses
End EventHandler
Property tapi As MyTAPIMBS
End Class
Class MainWindow Inherits Window
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
Module Module1
Sub Log(s as string)
mainWindow.List.addrow s
mainWindow.list.ScrollPosition = MainWindow.List.ListCount
End Sub
End Module
Class MyTAPIMBS Inherits TAPIMBS
EventHandler Sub CallStateChanged(CallInfo as ITCallInfoMBS)
log CurrentMethodName
Select case CallInfo.State
case CallInfo.StateConnected
log "state: connected"
case CallInfo.StateDisconnected
log "state: disconnected"
case CallInfo.StateHold
log "state: hold"
case CallInfo.StateIdle
log "state: idle"
case CallInfo.StateInProgress
log "state: in progress"
case CallInfo.StateOffering
log "state: offering"
case CallInfo.StateQueued
log "state: queued"
end Select
End EventHandler
EventHandler Sub IncomingCall(CallInfo as ITCallInfoMBS, BasicCallControl as TAPICallControlMBS)
log CurrentMethodName
log "CallerIDName: "+CallInfo.CallerIDName
log "CallerIDNumber: "+CallInfo.CallerIDNumber
End EventHandler
End Class
End Project
The items on this page are in the following plugins: MBS Win Plugin.