Qtopia Home - Classes - Hierachy - Annotated - Functions - Qt Embedded

phonevendor_p.h

This is the verbatim text of the phonevendor_p.h include file. It is provided only for illustration; the copyright remains with Trolltech.


/**********************************************************************
** Copyright (C) 2000-2004 Trolltech AS.  All rights reserved.
**
** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** 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/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/

#ifndef	PHONEVENDOR_P_H
#define	PHONEVENDOR_P_H

#include "phoneat.h"
#include "simtoolkit_p.h"


class SimToolkitAt;


class PhoneVendorAt : public QObject
{
    Q_OBJECT
public:
    PhoneVendorAt( PhoneLineAt *parent, const char *name = 0 );
    virtual ~PhoneVendorAt();

    PhoneLineAt *line() const { return _line; }

    bool enabled() const { return _enabled; }
    void setEnabled( bool flag );

    virtual void detect( const QString& manufacturer );
    virtual void init();
    virtual bool queryFilter( PhoneLine::QueryType type );
    virtual bool modifyFilter( PhoneLine::QueryType type, const QString& value );

    virtual bool shouldLeaveMessageStoreAlone() const;
    virtual bool needsAthForAbort() const;
    virtual bool hasModemPhoneBookCache() const;
    virtual bool hasDelayedSMSStartup() const;
    virtual bool hasSingleMessageStore() const;
    virtual bool hasRepeatingRings() const;
    virtual bool hasDelayedRegistration() const;
    virtual bool hasCellBroadcast() const;

    virtual QString messageListCommand() const;

    virtual bool partOfHoldGroup( PhoneCall::CallType type ) const;

    virtual void simInitialize();
    virtual void simBegin();
    virtual void simResponse( SimToolkitPrivate::ResponseType type,
			      const QString& data1, uint data2,
			      SimCommand::Type data3 );

    static void createVendors( QList<PhoneVendorAt>& vendors, PhoneLineAt *parent );

    virtual PhoneCall::CallType resolveCallType( const QString& type ) const;

    virtual bool hasUnsolicited( PhoneLine::QueryType type ) const;
    virtual bool hasEmptyPhoneBookIndex() const;

    virtual QStringList modifyGPRSInit( const QStringList& cmds ) const;

    virtual bool emptyPinIsReady() const;

protected slots:
    virtual void notification( const QString& msg );

protected:
    void chat( const QString& cmd );
    void chat( const QString& cmd, const char *slot );
    void chatLP( const QString& cmd );
    void chatLP( const QString& cmd, const char *slot );
    void registerNotificationType( const QString& type, bool mayBeCommand=FALSE );
    PhoneCall findByIdentifier( uint identifier );
    PhoneCall incomingCall();
    void callStatusAvailable();
    void ring( const QString& number, PhoneCall::CallType t = PhoneCall::Voice );
    void clearRing();
    void hangupRemote( PhoneCall call );
    void changeState( PhoneCall call, PhoneCall::State state );
    void callNotification( PhoneCall call, PhoneCall::Notification type, const QString& value );
    void flushCaches();
    void smsReady();
    void phoneBooksReady();
    void simInitializationDone();
    void simBeginFailed();
    void simCommand( const SimCommand& command );

    // Emit a "queryResult" signal on the PhoneLine object.
    void emitQueryResult( PhoneLine::QueryType type, const QString& value ) const
	    { line()->emitQueryResult( type, value ); }

    // Emit a "notification" signal on the PhoneLine object.
    void emitNotification( PhoneLine::QueryType type, const QString& value ) const
	    { line()->emitNotification( type, value ); }

    SimCommand decodeSimCommand( const QByteArray& binary );
    QByteArray encodeSimResponse( SimToolkitPrivate::ResponseType type,
			          const QString& data1, uint data2,
			          SimCommand::Type data3,
				  const QByteArray& command );
    QByteArray encodeSimEnvelope( SimToolkitPrivate::ResponseType type,
			          const QString& data1, uint data2,
			          SimCommand::Type data3 );

    static QString toHex( const QByteArray& binary );
    static QByteArray fromHex( const QString& hex );

private:
    PhoneLineAt *_line;
    bool _enabled;
};

#endif // PHONEVENDOR_P_H


Copyright © 2005 Trolltech Trademarks
Qtopia version 2.1.2