~ubuntu-branches/ubuntu/vivid/linphone/vivid

« back to all changes in this revision

Viewing changes to console/sipomatic.h

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Mimram
  • Date: 2006-11-15 10:34:50 UTC
  • mfrom: (1.2.1 upstream) (2.1.8 feisty)
  • Revision ID: james.westby@ubuntu.com-20061115103450-qgafwcks2lkhctlj
* New upstream release.
* Enable video support.
* Fix mismatched #endif in mscommon.h, closes: #398307.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 ***************************************************************************/
19
19
 
20
20
 
21
 
#include "../osipua/src/osipua.h"
22
 
#include "../osipua/src/sdphandler.h"
 
21
#include "../coreapi/linphonecore.h"
 
22
#include "../coreapi/sdphandler.h"
23
23
 
24
24
#undef PACKAGE
25
25
#undef VERSION
26
 
#include "../mediastreamer/mediastream.h"
 
26
#include "mediastreamer2/mediastream.h"
27
27
 
28
 
#include "../oRTP/src/telephonyevents.h"
 
28
#include <ortp/ortp.h>
 
29
#include <ortp/telephonyevents.h>
29
30
 
30
31
 
31
32
#define ANNOUCE_FILE8000HZ      "hello8000.wav"
33
34
 
34
35
struct _Sipomatic
35
36
{
36
 
        GMutex *lock;
37
 
        GList *audio_codecs;
38
 
        OsipUA *ua;
39
 
        GList *calls;
40
 
        gdouble acceptance_time;
41
 
        gdouble max_call_time;
42
 
        gchar *file_path8000hz;
43
 
        gchar *file_path16000hz;
 
37
        ms_mutex_t lock;
 
38
        MSList *calls;
 
39
        double acceptance_time;
 
40
        double max_call_time;
 
41
        char *file_path8000hz;
 
42
        char *file_path16000hz;
44
43
};
45
44
 
46
45
typedef struct _Sipomatic Sipomatic;
47
46
        
48
 
void sipomatic_init(Sipomatic *obj, gchar *url);
 
47
void sipomatic_init(Sipomatic *obj, char *url, bool_t ipv6);
49
48
void sipomatic_uninit(Sipomatic *obj);
50
49
void sipomatic_iterate(Sipomatic *obj);
51
 
#define sipomatic_lock(obj) g_mutex_lock((obj)->lock);
52
 
#define sipomatic_unlock(obj) g_mutex_unlock((obj)->lock);
 
50
#define sipomatic_lock(obj) ms_mutex_lock(&(obj)->lock);
 
51
#define sipomatic_unlock(obj) ms_mutex_unlock(&(obj)->lock);
53
52
 
54
53
void sipomatic_set_annouce_file(Sipomatic *obj, char *file);
55
54
 
 
55
struct stream_params{
 
56
        int ncodecs;
 
57
        int line;
 
58
        int localport;
 
59
        int remoteport;
 
60
        int pt;
 
61
        char *remaddr;
 
62
};
 
63
 
56
64
struct _Call
57
65
{
58
66
        Sipomatic *root;
59
 
        GTimer *timer;
60
 
        OsipDialog *dialog;
61
 
        transaction_t *current_trn;
 
67
        sdp_context_t *sdpc;
 
68
        int time;
 
69
        int did;
62
70
        AudioStream *audio_stream;
63
 
        gint state;
 
71
#ifdef VIDEO_ENABLED
 
72
        VideoStream *video_stream;
 
73
#endif
 
74
        int state;
64
75
        struct _CallParams *params;
65
 
        gint eof;
 
76
        int eof;
 
77
        RtpProfile *profile;
 
78
        struct stream_params audio;
 
79
        struct stream_params video;
66
80
};
67
81
 
68
82
#define CALL_STATE_INIT 0
71
85
 
72
86
typedef struct _Call Call;
73
87
 
74
 
struct _CallParams
75
 
{
76
 
        RtpProfile *profile;
77
 
        gint ncodecs;
78
 
        gint line;
79
 
        gint localport;
80
 
        gint remoteport;
81
 
        gint pt;
82
 
        gchar *remaddr;
83
 
};
84
 
typedef struct _CallParams CallParams;
85
88
        
86
 
Call * call_new(OsipDialog *dialog);
 
89
Call * call_new(Sipomatic *obj,int cid,char *sdp);
87
90
void call_accept(Call *call);
88
91
void call_release(Call *call);
89
92
void call_destroy(Call *call);
90
93
 
91
 
CallParams *call_params_new();
92
 
void call_params_destroy(CallParams *obj);
93
 
 
94
 
 
95
 
 
96
 
 
97
 
gboolean sipomatic_check_call(Sipomatic *obj,Call *call);
 
94
Call* sipomatic_find_call(Sipomatic *obj,int cid);