3 Copyright (C) 2008 jlh (jlh at gmx dot ch)
5 This program is free software; you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by the
7 Free Software Foundation; either version 2 of the License, version 3 of
8 the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 The GNU General Public License version 2 is included with the source of
20 this program under the file name COPYING. You can also get a copy on
37 class AudioFileWriter
;
43 class Call
: public QObject
{
46 Call(QObject
*, Skype
*, CallID
);
48 void startRecording(bool = false);
49 void stopRecording(bool = true);
50 bool okToDelete() const;
51 void setStatus(const QString
&);
52 QString
getStatus() const { return status
; }
53 bool statusDone() const;
54 CallID
getID() const { return id
; }
56 void hideConfirmation(int);
59 void startedCall(const QString
&);
61 void startedRecording();
62 void stoppedRecording();
65 QString
constructFileName() const;
66 QString
constructCommentTag() const;
68 void setShouldRecord();
77 AudioFileWriter
*writer
;
82 QPointer
<QObject
> confirmation
;
83 QDateTime timeStartRecording
;
85 QTcpServer
*serverLocal
, *serverRemote
;
86 QTcpSocket
*socketLocal
, *socketRemote
;
87 QByteArray bufferLocal
, bufferRemote
;
88 QByteArray bufferMono
;
95 void checkConnections();
96 void tryToWrite(bool = false);
97 void confirmRecording();
103 Call
&operator=(const Call
&);
106 class CallHandler
: public QObject
{
109 CallHandler(QObject
*, Skype
*);
111 void callCmd(const QStringList
&);
114 void startedCall(const QString
&);
116 void startedRecording();
117 void stoppedRecording();
120 void startRecording();
121 void stopRecording();
122 void stopRecordingAndDelete();
128 typedef QMap
<CallID
, Call
*> CallMap
;
129 typedef QSet
<CallID
> CallSet
;