2 * hfdialer - Hands Free Voice Call Manager
3 * Copyright (c) 2012, Intel Corporation.
5 * This program is licensed under the terms and conditions of the
6 * Apache License, version 2.0. The full text of the Apache License is at
7 * http://www.apache.org/licenses/LICENSE-2.0
14 #include <ofonovoicecallmanager.h>
19 class CallManager: public OfonoVoiceCallManager
23 Q_PROPERTY(int multipartyCallCount READ multipartyCallCount NOTIFY multipartyCallCountChanged)
24 Q_PROPERTY(int callCount READ callCount NOTIFY callCountChanged)
27 explicit CallManager(const QString &modemPath="", QObject *parent=0);
28 virtual ~CallManager();
31 int multipartyCallCount() const;
32 int callCount() const;
34 // Extended version of OfonoVoiceCallManager::getCalls() that
35 // returns QList of CallItems rather than strings
36 Q_INVOKABLE QList<CallItem *> getCallItems() const;
38 Q_INVOKABLE CallItem *activeCall() const;
39 Q_INVOKABLE CallItem *heldCall() const;
40 Q_INVOKABLE CallItem *dialingCall() const;
41 Q_INVOKABLE CallItem *incomingCall() const;
42 Q_INVOKABLE CallItem *waitingCall() const;
43 Q_INVOKABLE CallItem *alertingCall() const;
46 void setActiveCall(const CallItem &call);
48 // Overloaded version of OfonoVoiceCallManager::dial() that
49 // takes a PeopleItem rather than number string and uses default
51 // void dial(const PeopleItem *person);
53 // Overloaded version of OfonoVoiceCallManager::dial() that
54 // assumes CLIR == default
55 void dial(const QString &number);
57 // Overloaded version of OfonoVoiceCallManager::privateChat() that
58 // takes a CallItem rather than path string
59 void privateChat(const CallItem &call);
61 // Push denied answer signal to upper layers from call proxy
62 void deniedCallAnswer();
65 // Abstracts both callAdded() and callRemoved() into a single event
68 void incomingCall(CallItem *call);
69 void incomingCall(QString path);
70 void callDisconnected(const CallItem &call);
71 void onlyEmergencyCalls();
73 void multipartyCallCountChanged(const int &count);
74 void callCountChanged(const int &count);
77 void updateCallItems();
78 void addCall(const QString &path);
79 void removeCall(const QString &path);
80 void dialFinished(const bool status);
81 void hangupAllFinished(const bool status);
82 void swapFinished(const bool status);
83 void holdAndAnswerFinished(const bool status);
84 void transferFinished(const bool status);
85 void releaseAndAnswerFinished(const bool status);
86 void privateChatFinished(const bool status);
87 void createMultipartyFinished(const bool status);
88 void hangupMultipartyFinished(const bool status);
89 void sendTonesFinished(const bool status);
90 void callStateChanged();
91 void callMultipartyChanged();
93 // Handlers for Resource Policy Manager states and conditions
94 void proceedCallDial(const QString number);
95 void deniedCallDial();
97 void proceedIncomingCall(CallItem *call);
98 void deniedIncomingCall(CallItem *call);
99 void lostIncomingCall(CallItem *call);
102 class CallManagerPrivate *d;
104 Q_DISABLE_COPY(CallManager)
107 #endif // CALLMANAGER_H