Overview (PhoneLib)
New1 (PhoneLib)
PhoneLibVersion (PhoneLib)
NumCallLogEntries (PhoneLib)
GetCallLogEntry (PhoneLib)
MakeCall (PhoneLib)
Overview (PhoneLib) Top
With the phone library you can initiate phone calls and query the phone log. The phone library is a wrapper for the phone API. For easier usage, log handling API calls are simplified.
This library only can be used with PocketPC phones (somehow logical )!
This library was created by Stefan Biebl (stefan at biebl.com) for the Basic4PPC community. I must apologize for my bad english. Please report any bugs via e-mail. Thank you!
Example:
Sub Globals
End Sub
Sub App_Start
' add and initialize a phone object
AddObject("ph1", "Phone")
ph1.New1
' query phonelib version
MsgBox(ph1.PhoneLibVersion,"PhoneLib version")
' query number of call log entries
x = ph1.NumCallLogEntries
MsgBox(x, "Number of CallLogEntries")
' retrieve all call log entries
if x > 0 then
for y = 1 to x
MsgBox(ph1.GetCallLogEntry(y),"CallLogEntry #" & y)
next
end if
' initiate a phone call
if ph1.MakeCall("12345", "test", true) = false then Msgbox("Error", "MakeCall")
End Sub
New1 (PhoneLib) Top
Initializes a phone object.
Syntax: New1
PhoneLibVersion (PhoneLib) Top
Returns the version of the phone lib (for diagnostic reason).
Syntax: PhoneLibVersion as String
NumCallLogEntries (PhoneLib) Top
Retrieves the number of entries in the call log.
Syntax: NumCallLogEntries as Integer
GetCallLogEntry (PhoneLib) Top
Retrieves a single call log entry. Attention: enumeration starts at 1.
Syntax: GetCallLogEntry(entry as Integer) as String
The returned call log entry string is formatted as follows:
number; called party name; start time; end time; type
Separator sign is semicolon. Type can be: INCOMING, OUTGOING or MISSED. Date and time format depends on local settings (I presume).
Example: "12345;Stefan Biebl;09.04.2007 23:46:51;09.04.2007 23:46.51;OUTGOING"
MakeCall (PhoneLib) Top
Initiates a phone call. The first parameter is the number to dial. The second parameter is the called party name (shown in the log). The third parameter determines, wether the pocketpc phone will prompt before dialing.
Syntax: MakeCall(number as String, party as String, AskBeforeDial as Boolean) as Boolea