Home · All Classes · Grouped Classes · Annotated · Functions

GsmKeyFilter Class Reference

The GsmKeyFilter class filters key sequences looking for GSM control actions. More...

    #include <GsmKeyFilter>

Inherits QObject.

Public Types

Public Functions

Signals

Additional Inherited Members


Detailed Description

The GsmKeyFilter class filters key sequences looking for GSM control actions.

The GsmKeyFilter class filters key sequences looking for GSM control actions. The following standard control actions are recognized by this class:

0 SENDSet the busy state for a waiting call, or release the held calls.
1 SENDRelease the active calls.
1n SENDRelease only call n.
2 SENDSwap the active and held calls.
2n SENDActivate only call n, putting all others on hold.
3 SENDJoin the active and held calls into a multi-party conversation.
4 SENDJoin the active and held calls into a multi-party conversation and then detach the local user (i.e. transfer).
4*n SENDDeflect the waiting call to the number n.

Additional actions can be added with addAction().

This class is part of the Qtopia server and cannot be used by other Qtopia applications.


Member Type Documentation

enum GsmKeyFilter::Flag
flags GsmKeyFilter::Flags

Flags that modify the filtering of keys for GSM control actions.

ConstantValueDescription
GsmKeyFilter::Send( 1<<0 )The GSM SEND function has been selected. Usually this is the call button on the keypad.
GsmKeyFilter::Immediate( 1<<1 )The action should be taken immediately when the last character is matched. This is for sequences such as *#06# which must activate when the final # is pressed.
GsmKeyFilter::OnCall( 1<<2 )The digits were entered when there was an active or held call.
GsmKeyFilter::Incoming( 1<<3 )The digits were entered when there was an incoming call that has not yet been accepted.
GsmKeyFilter::BeforeDial( 1<<4 )The digits were encountered just before the dial attempt was made. The digits may have originated from a dialer or from a contact. This provides a last chance to intercept a string of digits before regular dialing occurs.
GsmKeyFilter::TestOnly( 1<<5 )Test to see if the filter would suceed, but do not apply.

The Flags type is a typedef for QFlags<Flag>. It stores an OR combination of Flag values.

enum GsmKeyFilter::ServiceAction

Action types for supplementary services.

ConstantValueDescription
GsmKeyFilter::Activate0Request to activate a supplementary service.
GsmKeyFilter::Deactivate1Request to deactivate a supplementary service.
GsmKeyFilter::Interrogate2Interrogate the current state of a supplementary service.
GsmKeyFilter::Registration3Register for a supplementary service.
GsmKeyFilter::Erasure4Erase a supplementary service.


Member Function Documentation

GsmKeyFilter::GsmKeyFilter ( QObject * parent = 0 )

Construct a GSM key filter and attach it to parent.

GsmKeyFilter::~GsmKeyFilter ()

Destroy this GSM key filter.

void GsmKeyFilter::activate ( int call )   [signal]

Signal that is emitted when the 2X SEND key sequence is encountered while on a call, where X is the call identifier. This will activate the indicated call, putting other calls on hold.

void GsmKeyFilter::addAction ( const QString & digits, QObject * target, const char * slot, GsmKeyFilter::Flags flags = GsmKeyFilter::Immediate )

Add digits as an action which will cause slot to be invoked on target when the specified string of digits is entered.

The flags modifies when the action will be accepted or ignored. For example, setting Send will require that the SEND key be pressed to terminate the sequence; setting Incoming will require that there be an incoming call.

The prototype for slot should be action() or action(QString) where action is the name of the slot. The digit sequence entered will be passed to the slot if it has a QString argument.

Actions are matched in the order in which they were added.

void GsmKeyFilter::addAction ( const QRegExp & regex, QObject * target, const char * slot, GsmKeyFilter::Flags flags = GsmKeyFilter::Immediate )

This is an overloaded member function, provided for convenience.

Add regex as an action which will cause slot to be invoked on target when a string of digits is entered which matches regex.

The flags modifies when the action will be accepted or ignored. For example, setting Send will require that the SEND key be pressed to terminate the sequence; setting Incoming will require that there be an incoming call. All specified flags must be present.

The prototype for slot should be action() or action(QString) where action is the name of the slot. The digit sequence entered will be passed to the slot if it has a QString argument.

If regex includes a capture specification between parentheses, then only that part of the digit string will be passed to the slot. For example, 4*([0-9]+) indicates that only the digits after the 4* prefix should be passed to the slot.

Actions are matched in the order in which they were added.

void GsmKeyFilter::addService ( const QString & code, QObject * target, const char * slot, GsmKeyFilter::Flags flags = GsmKeyFilter::Send )

Add action filters for the supplementary service associated with code and call slot on target when the action is encountered.

The prototype for slot should be action(GsmKeyFilter::ServiceAction, QStringList) where action is the name of the slot. The first parameter will be the type of action to be taken, and the second parameter will be the list of *-separated parameters that were supplied to the action, starting with the service code.

The flags modifies when the action will be accepted or ignored. For example, setting Send will require that the SEND key be pressed to terminate the sequence; setting Incoming will require that there be an incoming call. All specified flags must be present.

void GsmKeyFilter::deflect ( const QString & number )   [signal]

Signal that is emitted when the 4*NUM SEND key sequence is encountered when there was an incoming call, which indicates that the incoming call should be deflected to NUM. The NUM value is supplied in the number parameter to the signal.

bool GsmKeyFilter::filter ( const QString & digits, Flags flags )

Filter the supplied string of digits to determine if it corresponds to a GSM control action. The flags indicate the context within which digits should be interpreted.

Returns false if the digit sequence is not recognized by the filter. The filter will be called again when there are more digits (or less if a backspace was encountered).

Returns true if the digit sequence was recognized and acted upon. The caller should clear the digit buffer.

void GsmKeyFilter::join ()   [signal]

Signal that is emitted when the 3 SEND key sequence is encountered while on a call, which indicates that the active and held calls should be joined together into a single multi-party call.

void GsmKeyFilter::release ( int call )   [signal]

Signal that is emitted when the 1X SEND key sequence is encountered while on a call, where X is the call identifier. This will release the indicated call.

void GsmKeyFilter::releaseActive ()   [signal]

Signal that is emitted when the 1 SEND key sequence is encountered while on a call. This will release the active calls, and accept the waiting call if there is one.

void GsmKeyFilter::releaseAllAcceptIncoming ()   [signal]

Signal that is emitted when the 1 SEND key sequence is encountered when there is an incoming call but no active calls. This will accept the incoming call.

void GsmKeyFilter::releaseHeld ()   [signal]

Signal that is emitted when the 0 SEND key sequence is encountered while on a call and there is no incoming waiting call. This will release the held calls, if any.

void GsmKeyFilter::setBusy ()   [signal]

Signal that is emitted when the 0 SEND key sequence is encountered when there is an incoming waiting call.

void GsmKeyFilter::swap ()   [signal]

Signal that is emitted when the 2 SEND key sequence is encountered while on a call, which indicates that the active and held calls should be swapped. If there is only an active call, it should be put on hold. If there is only a held call, then it should be activated. If there is a waiting call, it will be accepted.

void GsmKeyFilter::transfer ()   [signal]

Signal that is emitted when the 4 SEND key sequence is encountered while on a call, which indicates that the active and held calls should be joined together into a single multi-party call, and then the local user should be detached.


Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3