Qtopia Home - Classes - Hierachy - Annotated - Functions - Licenses - Reference |
|
This is the verbatim text of the phonemanager.h include file. It is provided only for illustration; the copyright remains with Trolltech.
/**********************************************************************
** Copyright (C) 2000-2005 Trolltech AS. All rights reserved.
**
** This file is part of the Qtopia Environment.
**
** Licensees holding a valid license agreement from Trolltech or any of its
** authorized distributors may use this file in accordance with
** the License Agreement provided with the Licensed Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
** information about Trolltech's Commercial License Agreements.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#ifndef DIALERMANAGER_H
#define DIALERMANAGER_H
#include <qtopia/phone/calllist.h>
#include <qtopia/phone/phone.h>
#include <qtopia/phone/phonestatus.h>
#include <qtopia/speeddial.h>
#include <qobject.h>
#include "phoneprofile.h"
class DialerControl;
class PhoneLine;
class CallHistory;
class CallScreen;
class QuickDial;
class Dialer;
class SimCommand;
class MessageBox;
class EarpieceVolume;
class PhoneStatusServer;
class SpeedDialRec;
class QLabel;
class SpeedDialFeedback : public QFrame {
Q_OBJECT
public:
SpeedDialFeedback();
void show(QWidget* center, const QString& input, const SpeedDialRec&);
protected:
void keyReleaseEvent(QKeyEvent*);
void mouseReleaseEvent(QMouseEvent*);
void timerEvent(QTimerEvent*);
private:
ServiceRequest req;
QLabel *icon;
QLabel *label;
};
#ifndef MEDIAPLAYER_RINGTONES
class QWSSoundClient;
#endif
class PhoneManager : public QObject
{
Q_OBJECT
public:
PhoneManager(QObject *parent, const char *name=0);
~PhoneManager();
DialerControl *dialerControl() const;
CallScreen *callScreen() const { return mCallScreen; }
QuickDial *quickDialer() const { return quickDial; }
Dialer *touchscreenDialer() const { return mDialer; }
void showDialer(const QString &, bool speedDial = TRUE);
void showCallHistory(bool missed = FALSE, const QString &hint = QString::null );
void showCallScreen();
void showAlertDialogs();
void hideAlertDialogs();
void hideAll();
void queryPinRequired();
void queryPinAuthenticate(const QString &);
void queryPinAuthenticate(const QString &,const QString&);
void update();
int ringTime() const;
int missedCallCount() const;
static PhoneManager *instance();
enum Registration { NotRegistered=0, Home=1, Searching=2, Denied=3, Unknown=4, Roaming=5 };
// PD
enum VoIPRegistration { VoIPLineNotRegistered=0, VoIPLineRegistered,VoIPSearching,VoIPAuthenticationFailed };
static const QStringList &emergencyNumbers();
bool activateSpeedDial( const QString& input );
void setStatusValue(PhoneStatus::StatusItem item, QVariant value);
signals:
void missedCount(int);
void messageCount(int);
void activeCallCount(int);
void locationChanged(const QString&);
void registrationChanged(PhoneManager::Registration, PhoneManager::VoIPRegistration);
void phoneEnabled(bool);
void callForwardingEnabled(bool);
void pinUnlocked();
void pinRequired(const QString &);
void pinError();
void operatorChanged(const QString &);
void smsStoreFull(bool);
public slots:
void showProfileSelector();
void dialNumber(const QString &n, const QUuid &cnt);
void dialNumber(const QString &n);
void acceptIncoming();
void muteRing();
void nextRing();
void setPhoneEnabled(bool);
void queryPhoneEnabled();
void queryCallForwarding();
void increaseEarVolume();
void decreaseEarVolume();
void dialVoiceMail();
protected:
void timerEvent(QTimerEvent *);
private slots:
void resetMissedCalls();
void stateChanged();
void missedCall(const QString&);
void queryResult(PhoneLine::QueryType type, const QString& value);
void notification(PhoneLine::QueryType type, const QString& value);
void requestFailed(const PhoneCall&, PhoneCall::Request);
void simCommand(const SimCommand &cmd);
void messageBoxDone(int);
void speedDial( const QString& input );
//PD Slot added to introduce delay to silent the sound server
// before dialing or before accepting the incmoing call
void acceptVoipCall( void );
void dialVoipCall( void );
void releaseAudio();
private:
QString dialNum;
bool sendCallerid;
PhoneLineType lType;
int soundServerSilent;
//PD En
QTimer* releaseAudioTimer;
private:
enum RingType {
NotRinging,
Call,
Msg
};
void startRinging(RingType);
void stopRinging();
void showWarning(const QString &title, const QString &text);
bool callerIdNeeded(const QString &n) const;
#ifndef MEDIAPLAYER_RINGTONES
void initSoundClient();
#endif
private:
DialerControl *control;
CallHistory *callHistory;
CallScreen *mCallScreen;
QuickDial *quickDial;
Dialer *mDialer;
EarpieceVolume *volumeScreen;
MessageBox *missedMsgBox;
MessageBox *messagesMsgBox;
MessageBox *incomingMsgBox;
MessageBox *dialingMsgBox;
MessageBox *warningMsgBox;
MessageBox *serviceMsgBox;
#ifndef MEDIAPLAYER_RINGTONES
QWSSoundClient *soundclient;
#endif
RingType currentRingSource;
QTime ringtime;
int missedCalls;
int alertedMissed;
int activeCalls;
int lastRingVolume;
QString curRingTone;
PhoneProfile::AlertType curAlertType;
bool vibrateActive;
int curMessageCount;
int alertedMessageCount;
QString queuedCall;
PhoneLineType queuedLineType;
bool queuedIncoming;
bool phoneOn;
bool wantPhoneOn;
bool callFwdState;
Registration regState;
// PD
VoIPRegistration regVoIPState;
QString oper;
int regTid;
int msgTid;
int vrbTid;
int aaTid;
int updateTid;
bool cfunAvailable;
bool simToolkitActive;
bool initialized;
QString lastPin;
static PhoneManager *phoneManager;
static QStringList *emergencyNum;
SpeedDialFeedback *speeddialfeedback;
bool waitingRequiredPin;
bool waitingVoiceMailNumber;
bool smsFull;
PhoneStatusServer *statServer;
};
#endif
| Copyright © 2005 Trolltech | Trademarks | Qtopia version 2.2.0
|