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  · 

QPhoneCallImpl Class Reference
[QtTelephonyModule]

The QPhoneCallImpl class provides a base class for specific phone call implementations. More...

    #include <QPhoneCallImpl>

Inherits QObject.

Inherited by QModemCall.

Public Types

  • enum Action { None, Accept, Hold, ActivateCall, ..., Transfer }
  • flags Actions

Public Functions

  • 29 public functions inherited from QObject

Signals

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
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QPhoneCallImpl class provides a base class for specific phone call implementations.

Phone call providers (e.g. GSM and VoIP) inherit from the QPhoneCallProvider class and override the create() method to create a QPhoneCallImpl instance that is specific to their requirements.

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 QPhoneCall and QPhoneCallManager to make and receive phone calls. Only the server-side providers need to use QPhoneCallProvider and QPhoneCallImpl.

For AT-based modems, phone call providers should consider using QModemCall instead of QPhoneCallImpl.

See also QPhoneCallProvider and QModemCall.


Member Type Documentation

enum QPhoneCallImpl::Action
flags QPhoneCallImpl::Actions

This enum defines actions that a phone call can perform in its current state.

ConstantValueDescription
QPhoneCallImpl::None0No actions are possible.
QPhoneCallImpl::Accept0x0001Incoming call that can be accepted.
QPhoneCallImpl::Hold0x0002Connected call that can be put on hold.
QPhoneCallImpl::ActivateCall0x0004Held call that can be individually activated.
QPhoneCallImpl::ActivateGroup0x0008Held call that can be activated with its group.
QPhoneCallImpl::Join0x0010Call which can be joined to a multi-party conversation.
QPhoneCallImpl::JoinAndDetach0x0020Call which can be joined to a multi-party conversation, with the local user being detached.
QPhoneCallImpl::Tone0x0040DTMF tones are possible on this connected call.
QPhoneCallImpl::Transfer0x0080Call can be transferred to another number.

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


Member Function Documentation

QPhoneCallImpl::QPhoneCallImpl ( QPhoneCallProvider * provider, const QString & identifier, const QString & callType )

Creates a new phone call implementation object and attaches it to provider. The identifier is a globally-unique value that identifies the call. If identifier is empty, then this constructor will allocate a new identifier.

The callType indicates the type of call to be constructed (Voice, Data, Fax, VoIP, etc).

QPhoneCallImpl::~QPhoneCallImpl ()   [virtual]

Destroys this phone call implementation object. 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), or when the QPhoneCallProvider that owns this object is deleted.

void QPhoneCallImpl::accept ()   [virtual]

Accepts an incoming call. The call must be in the Incoming state. The default implementation does nothing.

QPhoneCallImpl::Actions QPhoneCallImpl::actions () const

Returns the actions that can be performed on this call in its current state.

See also setActions().

void QPhoneCallImpl::activate ( QPhoneCall::Scope scope )   [virtual]

Activates this call and takes it off hold. The scope indicates whether the activation relates to this call only (QPhoneCall::CallOnly), or the entire call group (QPhoneCall::Group). The default implementation does nothing.

QString QPhoneCallImpl::callType () const

Returns the call type for this call. The callType indicates the type of call to be constructed (Voice, Data, Fax, VoIP, etc).

See also QPhoneCall::callType().

int QPhoneCallImpl::dataPort () const

Returns the data port that will be used for passing the body of a data call to client applications. Returns -1 if not set.

See also setDataPort().

void QPhoneCallImpl::dial ( const QDialOptions & options )   [virtual]

Dials a call according to the specified options. The default implementation sets number() to the value specified in options, but does not do anything else.

See also QDialOptions.

void QPhoneCallImpl::emitNotification ( QPhoneCall::Notification type, const QString & value )

Emits the notification() signal with the parameters type and value.

This is a public method that emits the protected notification() signal. It is intended for use in QPhoneCallProvider implementations.

See also notification().

void QPhoneCallImpl::floorChanged ( bool haveFloor, bool floorAvailable )   [signal]

Signal that is emitted when the floor state changes to haveFloor in response to a requestFloor(), releaseFloor(), or implicit release. Also emitted when the upstream floorAvailable state changes.

void QPhoneCallImpl::hangup ( QPhoneCall::Scope scope )   [virtual]

Hangs up this call and/or all other calls of its type (active/held). The scope indicates whether the hangup relates to this call only (QPhoneCall::CallOnly), or the entire call group (QPhoneCall::Group). The default implementation does nothing.

void QPhoneCallImpl::hold ()   [virtual]

Puts this call on hold. The default implementation fails the request indicating that hold is not supported by emitting the requestFailed() signal.

QString QPhoneCallImpl::identifier () const

Returns the globally-unique identifier that is associated with this call.

void QPhoneCallImpl::join ( bool detachSubscriber )   [virtual]

Joins the active and held calls together and makes them all active. If detachSubscriber is true, then the current subscriber is detached from the conversation. The default implementation fails the request indicating that join is not supported by emitting the requestFailed() signal.

void QPhoneCallImpl::notification ( QPhoneCall::Notification type, const QString & value )   [signal]

Signal that is emitted when the auxiliary notification type is set to value.

See also emitNotification().

QString QPhoneCallImpl::number () const

Returns the phone number associated with the party on the other end of this call. Returns an empty string if the other party is unknown (e.g. caller id is disabled).

See also setNumber().

QPhoneCallProvider & QPhoneCallImpl::provider () const

Returns the provider that is associated with this call.

void QPhoneCallImpl::releaseFloor ()   [virtual]

Releases the floor in a voice group call. The floorChanged() signal should be emitted when the floor state changes. If the phone call type does not support the floor, this function should do nothing.

void QPhoneCallImpl::requestFailed ( QPhoneCall::Request request )   [signal]

Signal that is emitted when a specific type of request fails.

See also hold() and join().

void QPhoneCallImpl::requestFloor ( int secs )   [virtual]

Requests the floor in a voice group call for secs seconds. After the timeout, the floor will be automatically released.

If secs is -1, then requests the floor until explicitly released by a call to releaseFloor().

The floorChanged() signal should be emitted when the floor state changes.

void QPhoneCallImpl::setActions ( QPhoneCallImpl::Actions actions )   [virtual]

Sets the actions that can be performed on this call. This should be called before setState() as the actions are only advertised to client applications when the state changes.

See also actions() and setState().

void QPhoneCallImpl::setDataPort ( int port )

Sets the data port that will be used for passing the body of a data call to client applications to port. This should be set before changing the call's state to QPhoneCall::Connected with setState().

See also dataPort().

void QPhoneCallImpl::setNumber ( const QString & number )   [virtual]

Sets the phone number associated with this call. This should be set on an outgoing call before setting the state to QPhoneCall::Dialing, and on an incoming call before setting the state to QPhoneCall::Incoming.

See also number().

void QPhoneCallImpl::setState ( QPhoneCall::State state )   [virtual]

Sets the call's state and emits the stateChanged() signal. If the call has already ended, the state change will be ignored.

Once the call ends, the QPhoneCallProvider will arrange for this object to be deleted upon the next entry to the event loop.

See also state() and stateChanged().

QPhoneCall::State QPhoneCallImpl::state () const

Returns the state that this call is currently in.

See also setState(), stateChanged(), and QPhoneCall::state().

void QPhoneCallImpl::stateChanged ()   [signal]

Signal that is emitted when the call's state changes.

See also state() and setState().

void QPhoneCallImpl::tone ( const QString & tones )   [virtual]

Sends a sequence of DTMF tones over the call. Ignored if the call is not connected, or it is on hold. The default implementation does nothing.

void QPhoneCallImpl::transfer ( const QString & number )   [virtual]

Transfers the call to a new number and then discontinues this call. The default implementation fails the request indicating that transfer is not supported by emitting the requestFailed() signal.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 94
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 42
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 9
Page suivante

Le Qt Labs au hasard

Logo

Velours et QML Scene Graph

Les Qt Labs sont les laboratoires des développeurs de Qt, où ils peuvent partager des impressions sur le framework, son utilisation, ce que pourrait être son futur. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

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