Qtopia Phone体系架构

Qtopia Telephony System Overview

 

DialerControl

         The DialerControl class provides a convenient interface to the phone call manager.

         Application should use DialerControl instead of QPhoneCallManager

         Main functions:

        dial ( const QString & number, bool sendcallerid, const QString & callType = "Voice", const QUniqueId & contact = QUniqueId() )

        endAllCalls ()

        endCall ( int id )

        hold ()

        activateCall ( int id )

        accept ()

        join ()

        transfer ()

QPhoneCallManager

         Internally used by DialerControl

         new outgoing calls can be created with create().

         The calls() method returns a list of all active calls in the system

         As calls change state, the statesChanged() signal is emitted

         The newCall() signal is emitted when  new calls are added to the call list

 

 

QPhoneCall

 

         The QPhoneCall class provides an interface for managing individual incoming and outgoing phone calls.

         QPhoneCall is the primary interface for managing a phone call that is in progress.

         QPhoneCall instances act as identifiers for the actual call objects. The actual call object will persist until the call ends, either due to explicit hangup(), remote disconnection, or some form of network failure.

         State changes on individual calls can be tracked using QPhoneCall::connectStateChanged()

TelephonyService

All interfaces list: qtopia-phone-4.2.3/doc/html/phonelibrary.html

         Handlers in the telephony system are referred to as services. Each service has a unique name, such as modem, voip, etc.

         Within each service is a list of interfaces for functionality areas such as network registration, phone calls, SMS, SIM Application Toolkit, etc.

 

 

 

 

QPhoneCallProvider

         The QPhoneCallProvider class implements a mechanism for phone call providers to hook into the telephony system.

         Phone call providers inherit from the QPhoneCallProvider class and override the create() method. They also separately inherit their own call implementation class from QPhoneCallImpl.

         Subclasses should call setCallTypes() within their constructor to indicate the call types that they can handle.

         QPhoneCallProvider have two IPC channels(QtopiaIpcAdaptor) to communicate with other client application(dialer):

                        QPE/Communications/QPhoneCallProvider/Request

                        QPE/Communications/QPhoneCallProvider/Response

         Request received from QPE/Communications/QPhoneCallProvider/Request

                        dial(QString,QString,QString,QDialOptions)

                        hangup(QString,QPhoneCall::Scope)

                        accept(QString)

                        hold(QString)

                        activate(QString,QPhoneCall::Scope)

                        join(QString,bool)

                        tone(QString,QString)

                        transfer(QString,QString)

                        listAllCalls()

         Response sent from QPE/Communications/QPhoneCallProvider/Response:

                        requestFailed(QString,QPhoneCall::Request)

                        notification(QString,QPhoneCall::Notification,QString)

                        dataPort(QString,int)             stateChanged(QString,QPhoneCall::State,QString,QString,QString,int)

                        stateTransaction(QByteArray)

QPhoneCallImpl

         The QPhoneCallImpl class provides a base class for specific phone call implementations.

         The QPhoneCallProvider class provides the infrastructure to receive requests from client applications and dispatch them to the appropriate methods on QPhoneCallImpl. As the calls change state, the state information is sent back to the client applications.

Outgoing call state machine

 

Incoming call State Machine

Make a phone call

  • DMSPhoneCallProvider is subclassed from QPhoneCallProvider
  • DMSPhoneCallImple is subclessed from QPhoneCalImple
  • DMSLayer is a class which encapsulates  hardware-related phone system details.

Receive an incoming Call

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值