Replace functions which called once with their bodies
[pidgin-git.git] / libpurple / protocols / jabber / jingle / transport.h
blob3db389966aeb333dda942f37e464d7d89838fe85
1 /**
2 * @file transport.h
4 * purple
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.
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.
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.
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
25 #ifndef PURPLE_JABBER_JINGLE_TRANSPORT_H
26 #define PURPLE_JABBER_JINGLE_TRANSPORT_H
28 #include <glib.h>
29 #include <glib-object.h>
31 #include "jingle.h"
32 #include "xmlnode.h"
34 G_BEGIN_DECLS
36 #define JINGLE_TYPE_TRANSPORT jingle_transport_get_type()
38 typedef struct _JingleTransport JingleTransport;
40 /** The transport class */
41 struct _JingleTransportClass
43 GObjectClass parent_class; /**< The parent class. */
45 const gchar *transport_type;
46 PurpleXmlNode *(*to_xml) (JingleTransport *transport, PurpleXmlNode *content, JingleActionType action);
47 JingleTransport *(*parse) (PurpleXmlNode *transport);
48 void (*add_local_candidate) (JingleTransport *transport, const gchar *id, guint generation, PurpleMediaCandidate *candidate);
49 GList *(*get_remote_candidates) (JingleTransport *transport);
52 /**
53 * Gets the transport class's GType
55 * @return The transport class's GType.
57 G_MODULE_EXPORT
58 G_DECLARE_DERIVABLE_TYPE(JingleTransport, jingle_transport, JINGLE, TRANSPORT,
59 GObject)
61 /**
62 * Registers the JingleTransport type in the type system.
64 void jingle_transport_register(PurplePlugin *plugin);
66 JingleTransport *jingle_transport_create(const gchar *type);
67 const gchar *jingle_transport_get_transport_type(JingleTransport *transport);
69 void jingle_transport_add_local_candidate(JingleTransport *transport, const gchar *id, guint generation, PurpleMediaCandidate *candidate);
70 GList *jingle_transport_get_remote_candidates(JingleTransport *transport);
72 JingleTransport *jingle_transport_parse(PurpleXmlNode *transport);
73 PurpleXmlNode *jingle_transport_to_xml(JingleTransport *transport, PurpleXmlNode *content, JingleActionType action);
75 G_END_DECLS
77 #endif /* PURPLE_JABBER_JINGLE_TRANSPORT_H */