Classified ads
mvoicecallengine.h
Go to the documentation of this file.
1 /* -*-C++-*- -*-coding: utf-8-unix;-*-
2  Classified Ads is Copyright (c) Antti J√§rvinen 2015.
3 
4  This file is part of Classified Ads.
5 
6  Classified Ads is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  Classified Ads is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with Classified Ads; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
21 #ifndef VOICECALL_ENG_INTERFACE_H
22 #define VOICECALL_ENG_INTERFACE_H
23 #include <QList>
24 class Hash ;
25 class VoiceCall ;
26 
34 public:
38  enum CallState {
41  Open,
46  };
47 
53  public:
57  virtual void callStatusChanged(quint32 aCallId,
58  CallState aState) = 0 ;
59  } ;
63  enum PayloadType {
64  Audio=1,
66  } ;
70  class CallData {
71  public:
72  quint32 iCallId ;
73  quint32 iSeqNo ;
74  quint32 iTimeStamp ;
76  QByteArray iPayload ;
77  } ;
81  virtual void installObserver(MCallStatusObserver* aObserver) = 0 ;
82 
86  virtual void removeObserver(MCallStatusObserver* aObserver) = 0 ;
87 
102  virtual void insertCallData(quint32 aCallId,
103  quint32 aSeqNo,
104  PayloadType aPayloadType,
105  const QByteArray& aPayload,
106  const Hash& aSendingNode) = 0 ;
107 
137  virtual void insertCallStatusData(const VoiceCall& aCallStatus,
138  const Hash& aSendingNode) = 0 ;
142  virtual QList<quint32> onGoingCalls() const = 0 ;
146  virtual CallState callStatus(quint32 aCallId) const = 0 ;
150  virtual void closeCall(quint32 aCallId) = 0 ;
154  virtual void acceptCall(quint32 aCallId) = 0 ;
155 } ;
156 #endif
virtual void insertCallStatusData(const VoiceCall &aCallStatus, const Hash &aSendingNode)=0
virtual void closeCall(quint32 aCallId)=0
Pure-virtual interface for voice call engine.
Definition: mvoicecallengine.h:33
Definition: mvoicecallengine.h:64
Carrier-class handling audio negotiation setup and data.
Definition: voicecall.h:40
Definition: mvoicecallengine.h:42
Hash is class that carries 160-bit digest.
Definition: hash.h:38
virtual void installObserver(MCallStatusObserver *aObserver)=0
quint32 iSeqNo
Definition: mvoicecallengine.h:73
virtual void insertCallData(quint32 aCallId, quint32 aSeqNo, PayloadType aPayloadType, const QByteArray &aPayload, const Hash &aSendingNode)=0
Definition: mvoicecallengine.h:65
PayloadType
Definition: mvoicecallengine.h:63
Definition: mvoicecallengine.h:70
Definition: mvoicecallengine.h:43
Definition: mvoicecallengine.h:52
CallState
Definition: mvoicecallengine.h:38
quint32 iCallId
Definition: mvoicecallengine.h:72
Definition: mvoicecallengine.h:39
virtual CallState callStatus(quint32 aCallId) const =0
virtual QList< quint32 > onGoingCalls() const =0
virtual void acceptCall(quint32 aCallId)=0
Definition: mvoicecallengine.h:40
Definition: mvoicecallengine.h:45
virtual void callStatusChanged(quint32 aCallId, CallState aState)=0
Definition: mvoicecallengine.h:44
QByteArray iPayload
Definition: mvoicecallengine.h:76
quint32 iTimeStamp
Definition: mvoicecallengine.h:74
virtual void removeObserver(MCallStatusObserver *aObserver)=0
PayloadType iPayloadType
Definition: mvoicecallengine.h:75
Definition: mvoicecallengine.h:41