summaryrefslogtreecommitdiff
path: root/telepathy-yell/call-channel.h
blob: 73715ffdfb80440b029fed90ab51982c14658267 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/*
 * call-channel.h - Header for TpyCallChannel
 * Copyright (C) 2010-2011 Collabora Ltd. <http://www.collabora.co.uk/>
 * @author Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

#ifndef __TPY_CALL_CHANNEL_H__
#define __TPY_CALL_CHANNEL_H__

#include <telepathy-glib/channel.h>

#include "enums.h"
#include "call-content.h"

G_BEGIN_DECLS

#define TPY_TYPE_CALL_CHANNEL (tpy_call_channel_get_type ())
#define TPY_CALL_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TPY_TYPE_CALL_CHANNEL, TpyCallChannel))
#define TPY_CALL_CHANNEL_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), TPY_TYPE_CALL_CHANNEL, TpyCallChannelClass))
#define TPY_IS_CALL_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TPY_TYPE_CALL_CHANNEL))
#define TPY_IS_CALL_CHANNEL_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), TPY_TYPE_CALL_CHANNEL))
#define TPY_CALL_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TPY_TYPE_CALL_CHANNEL, TpyCallChannelClass))

typedef struct _TpyCallChannel TpyCallChannel;
typedef struct _TpyCallChannelClass TpyCallChannelClass;
typedef struct _TpyCallChannelPrivate TpyCallChannelPrivate;

struct _TpyCallChannel
{
  /*<private>*/
  TpChannel parent;
  TpyCallChannelPrivate *priv;
};

struct _TpyCallChannelClass
{
  /*<private>*/
  TpChannelClass parent_class;
  GCallback _padding[7];
};

GType tpy_call_channel_get_type (void);

TpyCallChannel *tpy_call_channel_new (TpConnection *conn,
    const gchar *object_path,
    const GHashTable *immutable_properties,
    GError **error);

void tpy_call_channel_accept_async (TpyCallChannel *self,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean tpy_call_channel_accept_finish (TpyCallChannel *self,
    GAsyncResult *result,
    GError **error);

void tpy_call_channel_hangup_async (TpyCallChannel *self,
    TpyCallStateChangeReason reason,
    gchar *detailed_reason,
    gchar *message,
    GAsyncReadyCallback callback,
    gpointer user_data);

void tpy_call_channel_hangup_finish (TpyCallChannel *self,
    GAsyncResult *result,
    GError **error);

void tpy_call_channel_set_ringing_async (TpyCallChannel *self,
    GAsyncReadyCallback callback,
    gpointer user_data);

void tpy_call_channel_set_ringing_finish (TpyCallChannel *self,
    GAsyncResult *result,
    GError **error);

void tpy_call_channel_add_content_async (TpyCallChannel *self,
    gchar *name,
    TpMediaStreamType type,
    GAsyncReadyCallback callback,
    gpointer user_data);

TpyCallContent *tpy_call_channel_add_content_finish (TpyCallChannel *self,
    GAsyncResult *result,
    GError **error);

void tpy_call_channel_send_video (TpyCallChannel *self,
    gboolean send);

TpyCallState tpy_call_channel_get_state (TpyCallChannel *self,
    TpyCallFlags *flags, GHashTable **details);

gboolean tpy_call_channel_has_initial_audio (TpyCallChannel *self);
gboolean tpy_call_channel_has_initial_video (TpyCallChannel *self);

gboolean tpy_call_channel_has_dtmf (TpyCallChannel *self);

void tpy_call_channel_dtmf_start_tone (TpyCallChannel *self,
    TpDTMFEvent event);

void tpy_call_channel_dtmf_stop_tone (TpyCallChannel *self);

G_END_DECLS

#endif