Qtopia Home - Classes - Hierachy - Annotated - Functions - Licenses - Reference

dialercontrol.h

This is the verbatim text of the dialercontrol.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 DIALERCONTROL_H
#define DIALERCONTROL_H

#include <qobject.h>
#include <qstring.h>
#include <qdatetime.h>

#include <qtopia/phone/phone.h>
#include <qtopia/phone/calllist.h>

class DialerControlPrivate;
class CBSMessage;


class DialerControl : public QObject
{
    Q_OBJECT

public:
    DialerControl( QObject *parent = 0, const char *name = 0 );
    ~DialerControl();

    // Check for various phone states.
    bool hasIncomingCall() const;
    bool isDialing() const;

    QValueList<PhoneCall> activeCalls() const;
    QValueList<PhoneCall> callsOnHold() const;
    uint activeCallsCount() const;
    uint callsOnHoldCount() const;
    bool hasActiveCalls() const;
    bool hasCallsOnHold() const;
    bool isConnected() const;

    // Get incoming number
    PhoneCall incomingCall() const;

    PhoneLine &line() const;
    CallList &callList();

signals:
    // Raised when a change of state occurs.
    void stateChanged();

    void pendingTonesChanged( const PhoneCall &call );
    void requestFailed(const PhoneCall &,PhoneCall::Request);

    //signals for each event of a call
    void callCreated( const PhoneCall &call );
    void callMissed( const PhoneCall &call );
    void callDropped( const PhoneCall &call );
    void callPutOnHold( const PhoneCall &call );
    void callConnected( const PhoneCall &call );
    void callIncoming( const PhoneCall &call );
    void callDialing( const PhoneCall &call );

    // Raised when an incoming call is detected as "missed".
    void missed( const QString& number );

    // Raised when the location changes.
    void locationChanged( const QString& location );

public slots:
    PhoneCall createCall(PhoneLineType lineType=GSM_LINE);

    //Dials a number if there are no currently active calls
    // Would like to have cnt default to QUuid() but working around moc issue.
    void dial( const QString &number, bool sendcallerid, const QUuid &cnt, PhoneLineType lineType=GSM_LINE );

    // End the current call.
    void endCall();

    // End all calls.
    void endAllCalls();

    // Accept an incoming connection.
    void accept();

    // Put the current connection on hold.
    void hold();

    // Make the connections on hold active, putting the
    // active connections (if any) on hold.
    void unhold();

    // Join the active and on hold connections to create a
    // three way multi-party conference call.
    void join();

    // Send "busy" to an incoming call to indicate that the
    // user does not want to answer it.  "endCall()" will also
    // do this if there is no active calls.
    void sendBusy();

    // Resolves GSM and VOIP Line conflicts
    void controlIncomingCallsOnLine();




    // Join the active and on hold connections and hangup.
    void transfer();

    void recordCall( const PhoneCall &call );

private:
    PhoneLine *mLine;
    CallList mCallList;

private slots:
    void newCall( const PhoneCall& call );
    void callStateChanged( const PhoneCall& call );
    void cellBroadcast( const PhoneLine& line, const CBSMessage& m );
};

#endif


Copyright © 2005 Trolltech Trademarks
Qtopia version 2.2.0