Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QPhoneCallProvider Class Reference
[QtTelephonyModule]

The QPhoneCallProvider class implements a mechanism for phone call providers to hook into the telephony system. More...

    #include <QPhoneCallProvider>

Inherits QObject.

Inherited by QModemCallProvider.

Public Functions

  • 29 public functions inherited from QObject

Signals

Protected Functions

  • virtual QPhoneCallImpl * create ( const QString & identifier, const QString & callType ) = 0
  • virtual void deregisterCall ( QPhoneCallImpl * call )
  • virtual void registerCall ( QPhoneCallImpl * call )
  • void setCallTypes ( const QStringList & types )
  • 7 protected functions inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public type inherited from QObject
  • 4 static public members inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QPhoneCallProvider class implements a mechanism for phone call providers to hook into the telephony system.

Phone call providers (e.g. GSM and VoIP) inherit from the QPhoneCallProvider class and override the create() method. They also separately inherit their own call implementation class from QPhoneCallImpl.

Subclasses should call setCallTypes() within their constructor to indicate the call types that they can handle.

The QPhoneCallProvider class provides the infrastructure to receive requests from client applications and dispatch them to the appropriate methods on QPhoneCallImpl. As the calls change state, the state information is sent back to the client applications.

Client applications should use QPhoneCallManager and QPhoneCall to manage phone calls. Only the server-side providers need to use QPhoneCallProvider and QPhoneCallImpl.

For AT-based modems, phone call providers should consider using QModemCallProvider instead of QPhoneCallProvider.

See also QPhoneCallImpl, QPhoneCallManager, QPhoneCall, and QModemCallProvider.


Member Function Documentation

QPhoneCallProvider::QPhoneCallProvider ( const QString & service, QObject * parent )

Constructs a new phone call provider for service and attaches it to parent.

In a subclass, the constructor will typically contain a call to setCallTypes() to advertise the list of call types that the provider supports. The list is advertised in the Qt Extended value space and can be queried by client applications using QPhoneCallManager::callTypes().

The following example demonstrates the recommended contents for the constructor in a subclass of QPhoneCallProvider():

    VoIPCallProvider::VoIPCallProvider( QTelephonyService *service )
        : QPhoneCallProvider( service->service(), service )
    {
        setCallTypes( QStringList( "VoIP" ) );
    }

See also setCallTypes().

QPhoneCallProvider::~QPhoneCallProvider ()

Destroys this phone call provider and all calls associated with it.

void QPhoneCallProvider::beginStateTransaction ()

Begins a state change transaction. Calls to QPhoneCallImpl::setState() will be queued. The notification of the state change will not be sent to client applications until endStateTransaction() is called. This is typically used to update several calls at once; for example when swapping active and held calls.

If beginStateTransaction() is called multiple times before endStateTransaction(), then the notifications will be sent once the same number of endStateTransaction() calls have been made.

See also endStateTransaction() and QPhoneCallImpl::setState().

void QPhoneCallProvider::callStatesChanged ()   [signal]

Signal that is emitted when one or more calls within this provider have changed state.

See also QPhoneCallImpl::stateChanged().

QList<QPhoneCallImpl *> QPhoneCallProvider::calls () const

Returns the list of all phone calls associated with this provider.

See also create() and findCall().

QPhoneCallImpl * QPhoneCallProvider::create ( const QString & identifier, const QString & callType )   [pure virtual protected]

Creates a new phone call implementation object for a call of type callType, and assigns it the specified identifier. The object constructed will be of a subtype of QPhoneCallImpl. The typical implementation in the subclass is as follows:

    return new QMyPhoneCallImpl( this, identifier, callType );

This function is called when a dial request is received from a client application. It will be followed by a call to QPhoneCallImpl::dial().

For incoming calls, the provider implementation should construct a QPhoneCallImpl object directly, with an empty identifier as the argument.

Providers should not delete call implementation objects themselves. The objects will be automatically deleted when the call transitions into an end state (HangupLocal, HangupRemote, Missed, etc).

void QPhoneCallProvider::deregisterCall ( QPhoneCallImpl * call )   [virtual protected]

Called when call is deregistered from this provider. This function is called automatically by the destructor for QPhoneCallImpl.

See also registerCall().

void QPhoneCallProvider::endStateTransaction ()

Ends a state change transaction and transmits any queued notifications.

See also beginStateTransaction() and QPhoneCallImpl::setState().

QPhoneCallImpl * QPhoneCallProvider::findCall ( const QString & identifier ) const

Returns a call with a specific identifier. Returns null if there is no such call.

See also calls().

void QPhoneCallProvider::registerCall ( QPhoneCallImpl * call )   [virtual protected]

Called when call is first registered with this provider. This function is called automatically by the constructor for QPhoneCallImpl.

See also deregisterCall().

QString QPhoneCallProvider::service () const

Returns the name of the service that this provider is associated with.

void QPhoneCallProvider::setCallTypes ( const QStringList & types )   [protected]

Sets the list of supported call types for this provider. The list is advertised in the Qt Extended value space, and can be queried by client applications using QPhoneCallManager::callTypes().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web