Mercurial > pidgin.yaz
annotate libpurple/mediamanager.h @ 25735:4a208844bb63
Make voice calls work with Finch.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Sun, 24 Aug 2008 07:49:50 +0000 |
parents | f10e0ac24595 |
children | bd598b606ca4 |
rev | line source |
---|---|
25546 | 1 /** |
25552 | 2 * @file mediamanager.h Media Manager API |
25546 | 3 * @ingroup core |
25715
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
4 */ |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
5 |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
6 /* purple |
25546 | 7 * |
8 * Purple is the legal property of its developers, whose names are too numerous | |
9 * to list here. Please refer to the COPYRIGHT file distributed with this | |
10 * source distribution. | |
11 * | |
12 * This program is free software; you can redistribute it and/or modify | |
13 * it under the terms of the GNU General Public License as published by | |
14 * the Free Software Foundation; either version 2 of the License, or | |
15 * (at your option) any later version. | |
16 * | |
17 * This program is distributed in the hope that it will be useful, | |
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 * GNU General Public License for more details. | |
21 * | |
22 * You should have received a copy of the GNU General Public License | |
23 * along with this program; if not, write to the Free Software | |
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
25 */ | |
26 | |
27 #ifndef __MEDIA_MANAGER_H_ | |
28 #define __MEDIA_MANAGER_H_ | |
29 | |
25654
cbe97caec684
Use USE_VV instead of USE_FARSIGHT.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25647
diff
changeset
|
30 #ifdef USE_VV |
25546 | 31 |
32 #include <glib.h> | |
33 #include <glib-object.h> | |
34 | |
35 #include "connection.h" | |
36 #include "media.h" | |
37 | |
38 G_BEGIN_DECLS | |
39 | |
40 #define PURPLE_TYPE_MEDIA_MANAGER (purple_media_manager_get_type()) | |
41 #define PURPLE_MEDIA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManager)) | |
42 #define PURPLE_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManagerClass)) | |
43 #define PURPLE_IS_MEDIA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_MEDIA_MANAGER)) | |
44 #define PURPLE_IS_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_MANAGER)) | |
45 #define PURPLE_MEDIA_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_MANAGER, PurpleMediaManagerClass)) | |
46 | |
25715
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
47 /** @copydoc _PurpleMediaManager */ |
25546 | 48 typedef struct _PurpleMediaManager PurpleMediaManager; |
25715
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
49 /** @copydoc _PurpleMediaManagerClass */ |
25546 | 50 typedef struct _PurpleMediaManagerClass PurpleMediaManagerClass; |
25715
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
51 /** @copydoc _PurpleMediaManagerPrivate */ |
25546 | 52 typedef struct _PurpleMediaManagerPrivate PurpleMediaManagerPrivate; |
53 | |
25715
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
54 /** The media manager class. */ |
25546 | 55 struct _PurpleMediaManagerClass |
56 { | |
25715
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
57 GObjectClass parent_class; /**< The parent class. */ |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
58 }; |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
59 |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
60 /** The media manager's data. */ |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
61 struct _PurpleMediaManager |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
62 { |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
63 GObject parent; /**< The parent of this manager. */ |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
64 PurpleMediaManagerPrivate *priv; /**< Private data for the manager. */ |
25546 | 65 }; |
66 | |
25715
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
67 #ifdef __cplusplus |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
68 extern "C" { |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
69 #endif |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
70 |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
71 /**************************************************************************/ |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
72 /** @cname Media Manager API */ |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
73 /**************************************************************************/ |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
74 /*@{*/ |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
75 |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
76 /** |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
77 * Gets the media manager's GType. |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
78 * |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
79 * @return The media manager's GType. |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
80 */ |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
81 GType purple_media_manager_get_type(void); |
25546 | 82 |
25715
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
83 /** |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
84 * Gets the "global" media manager object. It's created if it doesn't already exist. |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
85 * |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
86 * @return The "global" instance of the media manager object. |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
87 */ |
25552 | 88 PurpleMediaManager *purple_media_manager_get(void); |
25715
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
89 |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
90 /** |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
91 * Creates a media session. |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
92 * |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
93 * @param manager The media manager to create the session under. |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
94 * @param gc The connection to create the session on. |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
95 * @param conference_type The conference type to feed into Farsight2. |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
96 * @param remote_user The remote user to initiate the session with. |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
97 * |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
98 * @return A newly created media session. |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
99 */ |
25546 | 100 PurpleMedia *purple_media_manager_create_media(PurpleMediaManager *manager, |
25647
e1c8ec1259de
Updates voice and video to use Farsight 2, gets XMPP voice conferences
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25563
diff
changeset
|
101 PurpleConnection *gc, |
e1c8ec1259de
Updates voice and video to use Farsight 2, gets XMPP voice conferences
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25563
diff
changeset
|
102 const char *conference_type, |
e1c8ec1259de
Updates voice and video to use Farsight 2, gets XMPP voice conferences
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25563
diff
changeset
|
103 const char *remote_user); |
25546 | 104 |
25727
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
105 /** |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
106 * Gets all of the media sessions. |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
107 * |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
108 * @param manager The media manager to get all of the sessions from. |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
109 * |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
110 * @return A list of all the media sessions. |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
111 */ |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
112 GList *purple_media_manager_get_media(PurpleMediaManager *manager); |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
113 |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
114 /** |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
115 * Removes a media session from the media manager. |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
116 * |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
117 * @param manager The media manager to remove the media session from. |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
118 * @param media The media session to remove. |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
119 */ |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
120 void |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
121 purple_media_manager_remove_media(PurpleMediaManager *manager, |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
122 PurpleMedia *media); |
f10e0ac24595
* Added input/output volume preferences for voice conversations.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25715
diff
changeset
|
123 |
25715
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
124 /*}@*/ |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
125 |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
126 #ifdef __cplusplus |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
127 } |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
128 #endif |
b8a73b6dc0a4
* Added documentation to media.h and mediamanager.h
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25654
diff
changeset
|
129 |
25546 | 130 G_END_DECLS |
131 | |
25654
cbe97caec684
Use USE_VV instead of USE_FARSIGHT.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
25647
diff
changeset
|
132 #endif /* USE_VV */ |
25546 | 133 |
134 | |
135 #endif /* __MEDIA_MANAGER_H_ */ |