| Home · All Classes · Annotated · Functions |
The QPhoneVendorAt class encapsulates vendor-specific GSM modem functionality More...
#include <QPhoneVendorAt>
Inherits QObject.
The QPhoneVendorAt class encapsulates vendor-specific GSM modem functionality
Vendors can subclass QPhoneVendorAt to provide vendor-specific functionality that isn't part of the base GSM 07.07 and GSM 07.05 specifications that the qtopiaphone library supports.
There can be multiple vendor objects active in the system, each one supporting a different type of modem. During startup, the vendor objects enter a detection phase to determine which one actually applies.
Thus, a system integrator can build a single binary version of Qtopia that will work with several different modem types. Or the system integrator can disable all vendor objects except the precise one that it is interested in.
The method "createVendors()" in this class is called by the phone library to create the initial vendor object list. If you add a new vendor handling subclass, you will need to modify this method.
See also QPhoneLine.
Construct a vendor object attached to parent called name.
Destruct this phone vendor object.
Abort a ATD dial command for the call modemIdentifier. The scope parameter is passed from QModemCall::hangup().
The default implementation calls abortDialCommand() followed by either ATH or AT+CHLD=1n depending upon the return value of needsAthForAbort().
Abort the current ATD command by sending a carriage return.
Emit a notification signal on a particular phone call object to notify client applications of a change in the auxillary value associated with type.
The initialization process should invoke "callStatusAvailable()" if the modem supports unsolicited call status indications.
The most important indications are those that indicate remote hangup and the transition from "dialing" to "connected".
Change the state on a call object and emit the necessary signals.
Send an AT command, cmd, to the modem.
This is an overloaded member function, provided for convenience.
Send an AT command, cmd, to the modem and receive the response via slot.
Send an AT command, cmd, to the modem over the "low priority" channel. This channel is intended for long-running commands that might otherwise interfere with the smooth operation of regular commands.
This is an overloaded member function, provided for convenience.
Send an AT command, cmd, to the modem over the "low priority" channel and receive the response via slot.
Clear the ringing state in the phone library. This should be invoked if the modem detects a missed call.
Create the initial list of vendor control objects for the phone line parent and append it to vendors. This function will need to be modified if you add a new vendor control class.
Decode a SIM command from its raw binary form, as according to GSM 11.14. The binary data is assumed to be in BER form, starting with the command tag. If the data starts with a "Proactive SIM" BER command wrapper, it will be skipped.
Detect whether the modem can be handled by this vendor object.
The manufacturer argument is a copy of the response from "AT+CGMI", which may allow this method to quickly determine if this vendor object supports the modem.
If the vendor modem is detected, the object will typically call "registerNotificationType" to register the notifications that it is interested in seeing via the "notification" slot, and call "callStatusAvailable()" to indicate if dynamic call status monitoring is possible.
Finally, if this vendor object determines that it does indeed support the modem, it should call "setEnabled(true)". Otherwise, it should call "setEnabled(false)".
Emit a "notification" signal on the QPhoneLine object for type and value.
Emit a "queryResult" signal on the QPhoneLine object for type and value.
On some modems, an empty response to "AT+CPIN?" is the same as a "READY" response. This function returns true to indicate such behavior. The default is false.
Determine if this vendor is currently enabled. Disabled vendors are ignored when accessing vendor-specific functionality.
See also setEnabled().
Encode a SIM "ENVELOPE" into its raw binary form, as according to GSM 11.14. The binary data will be in BER form, starting with the envelope type tag. This is only useful to encode responses to "SET UP MENU". The envelope parameters are type, data1, data2, and data3.
Encode a SIM "TERMINAL RESPONSE" into its raw binary form, as according to GSM 11.14. The binary data will be in BER form, starting with the command tag. The command parameter should contain the bytes that made up the command that this response pertains to. The response parameters are type, data1, data2, and data3.
Find a particular phone call object given its call identifier. Modems typically allocate small numbers like 1, 2, or 3 to active calls. This function allows the vendor object to retrieve the correct object when it receives a notification for a specific call.
Flush all cached phone book or SMS information from the system because the SIM has been removed from the modem.
Convert a hexadecimal string, hex, into a byte array.
Indicate to the phone library that the specified call has been hung up remotely. This will typically be sent in response to a call status notification message from the modem.
Returns true if the modem has cell broadcast message support (i.e. support for the AT+CSCB command).
Returns true if network registration commands such as AT+CREG and AT+COPS need to be delayed until later in the initialisation sequence. The vendor-specific class is responsible for deciding when "later" occur and issuing the commands then.
Determine if access to SMS facilities will be delayed by the modem until it has properly initialized itself. Some modems will refuse to respond to SMS commands until internal initialization is complete. The vendor object can indicate that the SMS facilities are initialized by calling "smsReady()".
Returns true if the "index" option to the AT+CPBW command should be empty to add an element rather than to update an existing element. Returns false (the default) if the "index" option should be "0" for this case.
Determine if the modem has an internal phone book cache. If this function returns true, then the phone library will not attempt to access phone books until "phoneBooksReady()" has been called.
Returns true if the modem automatically resends RING every few seconds while a call is incoming, and stops sending RING if the caller hangs up. Returns false if the modem does not resend RING every few seconds and instead uses some other mechanism to notify Qtopia that a remote hangup has occurred.
Determine if the modem has only a single message store called "SM". Normally, both "SM" and "ME" are inspected for incoming messages.
Determine if this vendor supports a particular type of unsolicited notification (e.g. SignalQuality, BatteryCharge) which will negate the need to poll for the value.
Get the call identifier for the current incoming call.
Initialize modem-specific functionality. This is called on the single vendor object which was detected by "detect()".
This function may be called more than once, especially after the modem has been reset using the "AT+CFUN" command. The "detect()" function will only be called once.
Return the line associated with this vendor object.
Return the command that lists the contents of an SMS message store. Normally this is "AT+CMGL=4", but some modems do not like the "=4".
Filter modification requests for setting type to value. If this vendor object needs special handling for type, it should perform its own vendor-specific functionality and return true. Otherwise, it should return FALSe to let the regular handling proceed.
Modify the list of AT commands to use for GPRS initialization, inserting or removing commands as required. Typically, the incoming cmds list will contain AT+CGDCONT, AT+CGQREQ, AT+CGqMin, AT+CGATT, AT+CGACT, and ATD commands.
Determine if the modem needs to use ATH to abort a dial request instead of the more usual AT+CHLD=1.
Determine if the modem needs to use ATH to reject an incoming call because the user is busy, instead of the more usual AT+CHLD=0. The default implementation returns false.
Determine if a particular kind of call is part of the normal hold group. On some systems, video calls are separate from the call grouping for voice and fax calls. Returns true by default. The type parameter indicates the type of call (phone, video, fax, etc).
Indicate that the modem is now ready to accept phone book related commands. See the description of "hasModemPhoneBookCache()" for more information.
Filter query requests for type. If this vendor object needs special handling for type, it should perform its own vendor-specific functionality and return true. Otherwise, it should return false to let the regular handling proceed.
Register a notification type with the AT command subsystem. Messages that start with type are sent to the vendor object via the "notification" slot.
If mayBeCommand is true, then the notification type may also be a valid command response, so the AT command subsystem must take care to properly distinguish command responses from notifications.
The notification will be delivered to slot on target.
Resolve a call type on a "+CRING" notification into the particular type of call that it represents. The type is guaranteed to be in lower case on entry to this function.
Set the ringing state in the phone library, indicating a call from number of the type t.
Note: the phone library already handles the "RING" and "+CRING" notifications. This method is for other modem-specific notifications.
Send an AT command, cmd, to the modem immediately, without waiting for existing commands to complete. This is typically used to send ATH to the modem to abort a ATD command.
Set the enable flag on this vendor object. Disabled vendors are ignored when accessing vendor-specific functionality.
Initially, all vendor objects will be enabled, but after detection, only one should remain enabled.
See also enabled().
Determine if the phone library should leave the message store alone when accessing SMS messages rather than force it to "SM".
Begin SIM toolkit functionality. This is called whenever the user activates the SIM toolkit application within the phone's user interface. The vendor object will typically respond with either a call to "simBeginFailed()" or a call to "simCommand()" with the main menu on the SIM.
Indicate that a call to "simBegin()" failed because SIM toolkit functionality is not available.
Process a command that came from a SIM toolkit application.
End SIM toolkit functionality.
Indicate that SIM toolkit initialization has finished.
Initialize the SIM toolkit functionality. Once initialization is complete, the vendor object must call "simInitializationDone()".
Send a response to the SIM toolkit application. The response parameters are type, data1, data2, and data3.
Indicate that the SMS facilities are ready. See the description of "hasDelayedSMSStartup()" for more information.
Convert the byte array binary into a hexadecimal string.
| Copyright © 2006 Trolltech | Trademarks | Qtopia 4.1.7 |