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  · 

QAdviceOfCharge Class Reference
[QtTelephonyModule]

The QAdviceOfCharge class provides advice of charge information about a user's phone account. More...

    #include <QAdviceOfCharge>

Inherits QCommInterface.

Inherited by QModemAdviceOfCharge.

Public Functions

Public Slots

  • 1 public slot inherited from QObject

Signals

Additional Inherited Members


Detailed Description

The QAdviceOfCharge class provides advice of charge information about a user's phone account.

The 3GPP TS 02.86 Advice of Charge supplementary service provides the phone with the information to produce an estimate of the cost of the service used. This telephony interface only applies to GSM-style mobile telephone networks.

Charges are indicated for the call, or calls, in progress when mobile originated or for the roaming leg only when mobile terminated. Any charges for non-call related transactions, and for certain supplementary services, such as Call Forwarding are not indicated.

The phone will receive at the beginning of each call (and as necessary during the call) a message, the Charge Advice Information. This message contains the elements which together define the rate at which the call is to be charged, time dependence, data dependence and for unit increments. The message is delivered to client applications via the currentCallMeter() signal in this class.

The charge information is reported in units, which vary depending upon the operator and the user's home currency. When the client calls requestPricePerUnit(), the service will respond with a pricePerUnit() signal to report the international currency name (for example, USD, EUR, AUD, GBP, DEM, etc) and the price per unit.

In addition to the call-specific call meter, there is an accumulated call meter that keeps track of all calls made since the last time the meter was reset with requestAccumulatedCallMeter().

The client can set a maximum accumulated call meter value with setAccumulatedCallMeterMaximum(). When the accumulated call meter is within 30 seconds of expiry, the callMeterMaximumWarning() signal will be emitted to warn the user that their account is almost depleted.

See also QCommInterface.


Member Function Documentation

QAdviceOfCharge::QAdviceOfCharge ( const QString & service = QString(), QObject * parent = 0, QCommInterface::Mode mode = Client )

Construct a new advice of charge object for service and attach it to parent. The object will be created in client mode if mode is Client, or server mode otherwise.

If service is empty, this class will use the first available service that supports advice of charge. If there is more than one service that supports advice of charge, the caller should enumerate them with QCommServiceManager::supports() and create separate QAdviceOfCharge objects for each.

See also QCommServiceManager::supports().

QAdviceOfCharge::~QAdviceOfCharge ()

Destroy this advice of charge object.

void QAdviceOfCharge::accumulatedCallMeter ( int value )   [signal]

Signal that is emitted to report the value of the accumulated call meter in units (zero if not set).

See also requestAccumulatedCallMeter() and resetAccumulatedCallMeter().

void QAdviceOfCharge::accumulatedCallMeterMaximum ( int value )   [signal]

Signal that is emitted in response to requestAccumulatedCallMeterMaximum() to report the maximum value that the call meter can obtain. The value will be zero if the call meter is unlimited, or not configured.

See also setAccumulatedCallMeterMaximum(), requestAccumulatedCallMeterMaximum(), and callMeterMaximumWarning().

void QAdviceOfCharge::callMeterMaximumWarning ()   [signal]

Signal that is emitted when there is approximately 30 seconds of call time remaining, or there is less than 30 seconds of call time remaining when starting a new call.

See also accumulatedCallMeterMaximum() and requestAccumulatedCallMeterMaximum().

void QAdviceOfCharge::currentCallMeter ( int value, bool explicitRequest )   [signal]

Signal that is emitted to report the value of the current call meter in units (zero if not set). If explicitRequest is true, then the signal resulted because of a call to requestCurrentCallMeter(). If explicitRequest is false, then the signal resulted because of an unsolicited notification from the modem of a change in the call meter.

See also requestCurrentCallMeter().

void QAdviceOfCharge::pricePerUnit ( const QString & currency, const QString & unitPrice )   [signal]

Signal that is emitted to response to requestPricePerUnit(). The currency parameter will be a three-character currency code (for example, USD, EUR, AUD, GBP or DEM). The unitPrice parameter will be the price per unit, with a dot used as a decimal separator (for example, 2.66).

The price is reported as a string to give maximum flexibility to client applications to convert it into a fixed-point or floating-point value to perform unit calculations.

If currency is an empty string, then the price per unit information could not be obtained.

See also setPricePerUnit() and requestPricePerUnit().

void QAdviceOfCharge::requestAccumulatedCallMeter ()   [virtual slot]

Request the accumulated call meter value, which will be reported via the accumulatedCallMeter() signal.

See also accumulatedCallMeter(), requestAccumulatedCallMeterMaximum(), and resetAccumulatedCallMeter().

void QAdviceOfCharge::requestAccumulatedCallMeterMaximum ()   [virtual slot]

Request the accumulated call meter maximum value, which will be reported via the accumulatedCallMeterMaximum() signal.

See also accumulatedCallMeterMaximum(), requestAccumulatedCallMeter(), setAccumulatedCallMeterMaximum(), and callMeterMaximumWarning().

void QAdviceOfCharge::requestCurrentCallMeter ()   [virtual slot]

Request the current call meter value, which will be reported via the currentCallMeter() signal.

See also currentCallMeter().

void QAdviceOfCharge::requestPricePerUnit ()   [virtual slot]

Request the price per unit information, which will be reported via the pricePerUnit() signal.

See also pricePerUnit() and setPricePerUnit().

void QAdviceOfCharge::resetAccumulatedCallMeter ( const QString & password )   [virtual slot]

Reset the accumulated call meter, with password supplying the SIM PIN2 value. The resetAccumulatedCallMeterResult() signal will be emitted to report the result of resetting the accumulated call meter.

See also accumulatedCallMeter(), requestAccumulatedCallMeter(), and resetAccumulatedCallMeterResult().

void QAdviceOfCharge::resetAccumulatedCallMeterResult ( QTelephony::Result result )   [signal]

Signal that is emitted in response to resetAccumulatedCallMeter() to report the result of the operation.

See also resetAccumulatedCallMeter() and requestAccumulatedCallMeter().

void QAdviceOfCharge::setAccumulatedCallMeterMaximum ( int value, const QString & password )   [virtual slot]

Sets the accumulated call meter maximum value, with password supplying the SIM PIN2 value. The setAccumulatedCallMeterMaximumResult() signal will be emitted to report the result of setting the accumulated call meter maximum value.

See also requestAccumulatedCallMeterMaximum(), accumulatedCallMeterMaximum(), callMeterMaximumWarning(), and setAccumulatedCallMeterMaximumResult().

void QAdviceOfCharge::setAccumulatedCallMeterMaximumResult ( QTelephony::Result result )   [signal]

Signal that is emitted in response to setAccumulatedCallMeterMaximum() to report the result of the operation.

See also setAccumulatedCallMeterMaximum() and requestAccumulatedCallMeterMaximum().

void QAdviceOfCharge::setPricePerUnit ( const QString & currency, const QString & unitPrice, const QString & password )   [virtual slot]

Sets the price per unit information to unitPrice in currency, with password supplying the SIM PIN2 value. The setPricePerUnit() signal will be emitted to report the result of setting the price per unit.

See also pricePerUnit() and setPricePerUnitResult().

void QAdviceOfCharge::setPricePerUnitResult ( QTelephony::Result result )   [signal]

Signal that is emitted in response to setPricePerUnit() to report the result of the operation.

See also setPricePerUnit() and requestPricePerUnit().

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 Quarterly au hasard

Logo

Implémenter un mutex en lecture et en écriture

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. 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