~vish/ubuntu/maverick/pidgin/bug25979

« back to all changes in this revision

Viewing changes to libpurple/protocols/jabber/jingle/content.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-10-09 19:40:26 UTC
  • mfrom: (1.4.1 upstream) (46.1.10 karmic)
  • Revision ID: james.westby@ubuntu.com-20091009194026-wbqqh0bsbz19nx5q
Tags: 1:2.6.2-1ubuntu7
* Don't stick the buddy list window to all desktops as some
  window managers have trouble to properly unstick it (LP: #346840)
  - debian/patches/11_buddy_list_really_show.patch
* Always use default tray icon size on KDE (LP: #209440)
  - debian/patches/62_tray_icon_size_kde.patch
* Use scrollbars in the preferences dialog if the screen height is
  below 700 px instead of 600 px
  - debian/patches/60_1024x600_gtkprefs.c.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * @file content.h
 
3
 *
 
4
 * purple
 
5
 *
 
6
 * Purple is the legal property of its developers, whose names are too numerous
 
7
 * to list here.  Please refer to the COPYRIGHT file distributed with this
 
8
 * source distribution.
 
9
 *
 
10
 * This program is free software; you can redistribute it and/or modify
 
11
 * it under the terms of the GNU General Public License as published by
 
12
 * the Free Software Foundation; either version 2 of the License, or
 
13
 * (at your option) any later version.
 
14
 *
 
15
 * This program is distributed in the hope that it will be useful,
 
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
18
 * GNU General Public License for more details.
 
19
 *
 
20
 * You should have received a copy of the GNU General Public License
 
21
 * along with this program; if not, write to the Free Software
 
22
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
 
23
 */
 
24
 
 
25
#ifndef PURPLE_JABBER_JINGLE_CONTENT_H
 
26
#define PURPLE_JABBER_JINGLE_CONTENT_H
 
27
 
 
28
 
 
29
#include "jabber.h"
 
30
#include "jingle.h"
 
31
#include "session.h"
 
32
#include "transport.h"
 
33
 
 
34
#include <glib.h>
 
35
#include <glib-object.h>
 
36
 
 
37
G_BEGIN_DECLS
 
38
 
 
39
#define JINGLE_TYPE_CONTENT            (jingle_content_get_type())
 
40
#define JINGLE_CONTENT(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), JINGLE_TYPE_CONTENT, JingleContent))
 
41
#define JINGLE_CONTENT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), JINGLE_TYPE_CONTENT, JingleContentClass))
 
42
#define JINGLE_IS_CONTENT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), JINGLE_TYPE_CONTENT))
 
43
#define JINGLE_IS_CONTENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), JINGLE_TYPE_CONTENT))
 
44
#define JINGLE_CONTENT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), JINGLE_TYPE_CONTENT, JingleContentClass))
 
45
 
 
46
/** @copydoc _JingleContent */
 
47
typedef struct _JingleContent JingleContent;
 
48
/** @copydoc _JingleContentClass */
 
49
typedef struct _JingleContentClass JingleContentClass;
 
50
/** @copydoc _JingleContentPrivate */
 
51
typedef struct _JingleContentPrivate JingleContentPrivate;
 
52
 
 
53
/** The content class */
 
54
struct _JingleContentClass
 
55
{
 
56
        GObjectClass parent_class;     /**< The parent class. */
 
57
 
 
58
        xmlnode *(*to_xml) (JingleContent *content, xmlnode *jingle, JingleActionType action);
 
59
        JingleContent *(*parse) (xmlnode *content);
 
60
        void (*handle_action) (JingleContent *content, xmlnode *xmlcontent, JingleActionType action);
 
61
        const gchar *description_type;
 
62
};
 
63
 
 
64
/** The content class's private data */
 
65
struct _JingleContent
 
66
{
 
67
        GObject parent;                /**< The parent of this object. */
 
68
        JingleContentPrivate *priv;      /**< The private data of this object. */
 
69
};
 
70
 
 
71
#ifdef __cplusplus
 
72
extern "C" {
 
73
#endif
 
74
 
 
75
/**
 
76
 * Gets the content class's GType
 
77
 *
 
78
 * @return The content class's GType.
 
79
 */
 
80
GType jingle_content_get_type(void);
 
81
 
 
82
JingleContent *jingle_content_create(const gchar *type, const gchar *creator,
 
83
                const gchar *disposition, const gchar *name,
 
84
                const gchar *senders, JingleTransport *transport);
 
85
 
 
86
JingleSession *jingle_content_get_session(JingleContent *content);
 
87
const gchar *jingle_content_get_description_type(JingleContent *content);
 
88
gchar *jingle_content_get_creator(JingleContent *content);
 
89
gchar *jingle_content_get_disposition(JingleContent *content);
 
90
gchar *jingle_content_get_name(JingleContent *content);
 
91
gchar *jingle_content_get_senders(JingleContent *content);
 
92
JingleTransport *jingle_content_get_transport(JingleContent *content);
 
93
JingleTransport *jingle_content_get_pending_transport(JingleContent *content);
 
94
 
 
95
void jingle_content_set_session(JingleContent *content, JingleSession *session);
 
96
void jingle_content_set_pending_transport(JingleContent *content, JingleTransport *transport);
 
97
void jingle_content_accept_transport(JingleContent *content);
 
98
void jingle_content_remove_pending_transport(JingleContent *content);
 
99
void jingle_content_modify(JingleContent *content, const gchar *senders);
 
100
 
 
101
#define jingle_content_create_content_accept(session) \
 
102
        jingle_session_to_packet(session, JINGLE_CONTENT_ACCEPT)
 
103
#define jingle_content_create_content_add(session) \
 
104
        jingle_session_to_packet(session, JINGLE_CONTENT_ADD)
 
105
#define jingle_content_create_content_modify(session) \
 
106
        jingle_session_to_packet(session, JINGLE_CONTENT_MODIFY)
 
107
#define jingle_content_create_content_remove(session) \
 
108
        jingle_session_to_packet(session, JINGLE_CONTENT_REMOVE)
 
109
 
 
110
JingleContent *jingle_content_parse(xmlnode *content);
 
111
xmlnode *jingle_content_to_xml(JingleContent *content, xmlnode *jingle, JingleActionType action);
 
112
void jingle_content_handle_action(JingleContent *content, xmlnode *xmlcontent, JingleActionType action);
 
113
 
 
114
#ifdef __cplusplus
 
115
}
 
116
#endif
 
117
 
 
118
G_END_DECLS
 
119
 
 
120
#endif /* PURPLE_JABBER_JINGLE_CONTENT_H */
 
121