| Home · All Classes · Annotated · Functions |
This section provides an example of the methods to route applications requests through the phone server to the AT command handlers and describes how the responses are returned to the application.
Using the SIMIdentity query type, which returns the IMSI number of the SIM the method is as follows:
PhoneLine *line = new PhoneLine();
connect( line, SIGNAL(queryResult(PhoneLine::QueryType, const QString&)),
this, SLOT(simIdResult(PhoneLine::QueryType, const QString&)) );
...
void AppClass::simIdResult( PhoneLine::QueryType type, const QString& value )
{
// Process the result "value".
...
}
line->query( PhoneLine::SIMIdentity );
For this example the query method is PhoneLineQCop::query which sends a QCop message to the phone server on the QPE/Phone channel.
Note: The PhoneLine for the phone server contains a private PhoneLineAt object rather than the PhoneLineQCop object used by applications.
This completes the example. Other commands and notifications within the phone library follow a similar pattern.
| Copyright © 2006 Trolltech | Trademarks | Qtopia 4.1.7 |