~noskcaj/ubuntu/saucy/sflphone/merge-1.2.3-2

« back to all changes in this revision

Viewing changes to daemon/src/iax/iaxvoiplink.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2012-05-19 21:46:37 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20120519214637-la8rbrford5kj6m3
Tags: 1.1.0-1
* New upstream release 
  - Fixes "FTBFS with libccrtp-dev/2.0.2 from experimental" (Closes: #663282)
* NEW Maintainer: Debian VoIP Team - Thanks Francois for your work.
  - (Closes: #665789: O: sflphone -- SIP and IAX2 compatible VoIP phone)
* Added Build-Depends: libdbus-c++-bin
* Add gcc47-fixes.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#define IAXVOIPLINK_H
34
34
 
35
35
#include "voiplink.h"
36
 
#include <iax-client.h>
37
36
#include "audio/codecs/audiocodec.h" // for DEC_BUFFER_SIZE
38
 
#include "global.h"
 
37
#include "sfl_types.h"
39
38
#include "noncopyable.h"
40
39
#include "audio/samplerateconverter.h"
41
 
 
42
 
namespace sfl {
43
 
class InstantMessaging;
44
 
}
45
 
 
46
 
class EventThread;
 
40
#include "eventthread.h"
 
41
 
 
42
#include <iax-client.h>
 
43
 
47
44
class IAXCall;
 
45
class IAXAccount;
48
46
 
49
47
class AudioCodec;
50
48
class AudioLayer;
51
49
 
52
 
class IAXAccount;
53
 
 
54
50
/**
55
51
 * @file iaxvoiplink.h
56
52
 * @brief VoIPLink contains a thread that listen to external events
66
62
        /**
67
63
         *      Listen to events sent by the call manager ( asterisk, etc .. )
68
64
         */
69
 
        void getEvent();
 
65
        bool getEvent();
70
66
 
71
67
        /**
72
68
         * Init the voip link
76
72
        /**
77
73
         * Terminate a voip link by clearing the call list
78
74
         */
79
 
        virtual void terminate();
 
75
        void terminate();
80
76
 
81
77
        /**
82
78
         * Send out registration
120
116
         * Cancel a call
121
117
         * @param id The ID of the call
122
118
         */
123
 
        virtual void cancel(const std::string& id UNUSED) {}
 
119
        virtual void cancel(const std::string& /*id*/) {}
124
120
 
125
121
        /**
126
122
         * Put a call on hold
167
163
        virtual void carryingDTMFdigits(const std::string& id, char code);
168
164
 
169
165
 
170
 
        virtual void sendTextMessage(sfl::InstantMessaging *module, const std::string& callID, const std::string& message, const std::string& from);
 
166
        virtual void sendTextMessage(const std::string& callID, const std::string& message, const std::string& from);
171
167
 
172
168
        /**
173
169
         * Return the codec protocol used for this call
238
234
         */
239
235
        void iaxOutgoingInvite(IAXCall* call);
240
236
 
241
 
        /** Threading object */
242
 
        EventThread* evThread_;
243
 
 
244
237
        /** registration session : 0 if not register */
245
238
        iax_session* regSession_;
246
239
 
254
247
        ost::Mutex mutexIAX_;
255
248
 
256
249
        /** encoder/decoder/resampler buffers */
257
 
        SFLDataFormat decData[DEC_BUFFER_SIZE];
258
 
        SFLDataFormat resampledData[DEC_BUFFER_SIZE];
259
 
        unsigned char encodedData[DEC_BUFFER_SIZE];
 
250
        SFLDataFormat decData_[DEC_BUFFER_SIZE];
 
251
#warning FIXME: resampled buffer should be resized as appropriate
 
252
        SFLDataFormat resampledData_[DEC_BUFFER_SIZE * 4];
 
253
        unsigned char encodedData_[DEC_BUFFER_SIZE];
260
254
 
261
255
        /** Sample rate converter object */
262
256
        SamplerateConverter converter_;
268
262
        bool initDone_;
269
263
 
270
264
        const std::string accountID_;
 
265
 
 
266
        /**
 
267
         * Threading object
 
268
         */
 
269
        EventThread evThread_;
271
270
};
272
271
 
273
272
#endif