Qtopia Home - Classes - Hierachy - Annotated - Functions - Licenses - Reference |
|
This is the verbatim text of the simtoolkit.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 SIMTOOLKIT_H
#define SIMTOOLKIT_H
#include "phone.h"
#include <qvaluelist.h>
#include <qdatastream.h>
class SimMenuItemPrivate;
class SimCommandPrivate;
class SimToolkitPrivate;
class SimMenuItem
{
public:
SimMenuItem();
SimMenuItem( const SimMenuItem& value );
~SimMenuItem();
uint identifier() const;
void setIdentifier( uint value );
QString label() const;
void setLabel( const QString& value );
bool hasHelp() const;
void setHasHelp( bool value );
SimMenuItem& operator=( const SimMenuItem & );
friend QDataStream &operator>>( QDataStream &, SimMenuItem & );
friend QDataStream &operator<<( QDataStream &, const SimMenuItem & );
private:
SimMenuItemPrivate *d;
};
QDataStream &operator>>( QDataStream &, SimMenuItem & );
QDataStream &operator<<( QDataStream &, const SimMenuItem & );
class SimCommand
{
public:
SimCommand();
SimCommand( const SimCommand& value );
~SimCommand();
// Command types.
enum Type
{
SetupMainMenu = 0,
DisplayText = 1,
GetInkey = 2,
GetInput = 3,
SetupCall = 4,
PlayTone = 5,
SetupSubMenu = 6,
Refresh = 7,
SendSS = 8,
SendSMS = 9,
SendUSSD = 10,
SetupEventList = 11,
Timeout = 98,
EndSession = 99,
LaunchBrowser = 200,
SetupIdleModeText = 201
};
// Disposition of other calls during a call setup.
enum Disposition
{
IfNoOtherCalls = 0, // Setup if no other calls.
PutOnHold = 1, // Put other calls on hold first.
Disconnect = 2 // Disconnect other calls first.
};
// Class of call to setup.
enum CallClass
{
Voice = 0,
Data = 1,
Fax = 2
};
// Tones that can be played.
enum Tone
{
ToneDial = 0,
ToneBusy = 1,
ToneCongestion = 2,
ToneRadioAck = 3,
ToneDropped = 4,
ToneError = 5,
ToneCallWaiting = 6,
ToneRinging = 7,
ToneGeneralBeep = 8,
TonePositiveBeep = 9,
ToneNegativeBeep = 10
};
// The type of refresh to perform.
enum RefreshType
{
InitAndFullFileChange = 0,
FileChange = 1,
InitAndFileChange = 2,
Initialization = 3,
Reset = 4
};
// Event types.
enum Event
{
IdleScreen = 1,
UserActivity = 2,
Both = 3,
Cancel = 4
};
// Browser launch mode.
enum BrowserLaunchMode
{
IfNotAlreadyLaunched = 0,
UseExisting = 2,
CloseExistingAndLaunch = 3
};
Type type() const;
void setType( Type value );
bool hasHelp() const;
void setHasHelp( bool value );
QString text() const;
void setText( const QString& value );
bool highPriority() const;
void setHighPriority( bool value );
bool clearAfterDelay() const;
void setClearAfterDelay( bool value );
bool wantDigits() const;
void setWantDigits( bool value );
bool wantYesNo() const;
void setWantYesNo( bool value );
uint minimumLength() const;
void setMinimumLength( uint value );
uint maximumLength() const;
void setMaximumLength( uint value );
bool echo() const;
void setEcho( bool value );
Disposition disposition() const;
void setDisposition( Disposition value );
bool withRedial() const;
void setWithRedial( bool value );
QString number() const;
void setNumber( const QString& value );
QString subAddress() const;
void setSubAddress( const QString& value );
CallClass callClass() const;
void setCallClass( CallClass value );
Tone tone() const;
void setTone( Tone value );
uint toneTime() const;
void setToneTime( uint value );
QString title() const;
void setTitle( const QString& value );
uint defaultItem() const;
void setDefaultItem( uint value );
QValueList<SimMenuItem> menuItems() const;
void setMenuItems( const QValueList<SimMenuItem>& value );
RefreshType refreshType() const;
void setRefreshType( RefreshType value );
Event events() const;
void setEvents( Event value );
BrowserLaunchMode browserLaunchMode() const;
void setBrowserLaunchMode( BrowserLaunchMode value );
QString url() const;
void setUrl( const QString& value );
SimCommand& operator=( const SimCommand & );
friend QDataStream &operator>>( QDataStream &, SimCommand & );
friend QDataStream &operator<<( QDataStream &, const SimCommand & );
private:
SimCommandPrivate *d;
};
QDataStream &operator>>( QDataStream &, SimCommand & );
QDataStream &operator<<( QDataStream &, const SimCommand & );
class SimToolkit : public QObject
{
friend class PhoneLine;
friend class PhoneServerQCop;
Q_OBJECT
private:
SimToolkit( SimToolkitPrivate *d, QObject *parent );
~SimToolkit();
PhoneLine *line() const;
public slots:
void begin();
void end();
void mainMenuSelected( uint item );
void clearText();
void key( const QString& value );
void input( const QString& value );
void allowCallSetup();
void denyCallSetup();
void subMenuSelected( uint item );
void subMenuExited();
void idleScreen();
void userActivity();
void endSession();
void moveBackward();
void cannotProcess();
void temporarilyUnavailable();
void noResponseFromUser();
void aborted();
void help( SimCommand::Type command, uint item=0 );
signals:
void command( const SimCommand& command );
void beginFailed();
private:
SimToolkitPrivate *d;
};
#endif // SIMTOOLKIT_H
| Copyright © 2005 Trolltech | Trademarks | Qtopia version 2.2.0
|