]> git.0d.be Git - empathy.git/blob - libempathy/empathy-tp-call.h
empathy-tp-tube: remove initiator and type member variables as they are not used
[empathy.git] / libempathy / empathy-tp-call.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2007 Elliot Fairweather
4  * Copyright (C) 2007-2008 Collabora Ltd.
5  *
6  * This library 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  * This library 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 this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  * Authors: Elliot Fairweather <elliot.fairweather@collabora.co.uk>
21  *          Xavier Claessens <xclaesse@gmail.com>
22  */
23
24 #ifndef __EMPATHY_TP_CALL_H__
25 #define __EMPATHY_TP_CALL_H__
26
27 #include <glib.h>
28 #include <telepathy-glib/channel.h>
29
30 #include "empathy-contact.h"
31
32 G_BEGIN_DECLS
33
34 #define EMPATHY_TYPE_TP_CALL (empathy_tp_call_get_type ())
35 #define EMPATHY_TP_CALL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), \
36     EMPATHY_TYPE_TP_CALL, EmpathyTpCall))
37 #define EMPATHY_TP_CALL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
38     EMPATHY_TYPE_TP_CALL, EmpathyTpCallClass))
39 #define EMPATHY_IS_TP_CALL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), \
40     EMPATHY_TYPE_TP_CALL))
41 #define EMPATHY_IS_TP_CALL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
42     EMPATHY_TYPE_TP_CALL))
43 #define EMPATHY_TP_CALL_GET_CLASS(object) \
44   (G_TYPE_INSTANCE_GET_CLASS ((object), \
45     EMPATHY_TYPE_TP_CALL, EmpathyTpCallClass))
46
47 typedef struct _EmpathyTpCall EmpathyTpCall;
48 typedef struct _EmpathyTpCallClass EmpathyTpCallClass;
49
50 struct _EmpathyTpCall {
51   GObject parent;
52   gpointer priv;
53 };
54
55 struct _EmpathyTpCallClass {
56   GObjectClass parent_class;
57 };
58
59 typedef enum
60 {
61   EMPATHY_TP_CALL_STATUS_READYING,
62   EMPATHY_TP_CALL_STATUS_PENDING,
63   EMPATHY_TP_CALL_STATUS_ACCEPTED,
64   EMPATHY_TP_CALL_STATUS_CLOSED
65 } EmpathyTpCallStatus;
66
67 typedef struct
68 {
69   gboolean exists;
70   guint id;
71   guint state;
72   guint direction;
73 } EmpathyTpCallStream;
74
75 GType empathy_tp_call_get_type (void) G_GNUC_CONST;
76 EmpathyTpCall *empathy_tp_call_new (TpChannel *channel);
77 void empathy_tp_call_close (EmpathyTpCall *call);
78
79 void empathy_tp_call_to (EmpathyTpCall *call, EmpathyContact *contact);
80
81 void empathy_tp_call_accept_incoming_call (EmpathyTpCall *call);
82 void empathy_tp_call_request_video_stream_direction (EmpathyTpCall *call,
83     gboolean is_sending);
84 void empathy_tp_call_start_tone (EmpathyTpCall *call, TpDTMFEvent event);
85 void empathy_tp_call_stop_tone (EmpathyTpCall *call);
86 gboolean empathy_tp_call_has_dtmf (EmpathyTpCall *call);
87
88 G_END_DECLS
89
90 #endif /* __EMPATHY_TP_CALL_H__ */