[telepathy-gabble/master] JingleTransportIface: replace retransmit_candidates() with produce_node()
Senko Rasic
senko.rasic at collabora.co.uk
Mon Jun 29 04:43:17 PDT 2009
---
src/jingle-transport-iface.c | 25 ++++++++++++++-----------
src/jingle-transport-iface.h | 9 +++++----
2 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/src/jingle-transport-iface.c b/src/jingle-transport-iface.c
index fb0eee1..86b220a 100644
--- a/src/jingle-transport-iface.c
+++ b/src/jingle-transport-iface.c
@@ -51,6 +51,20 @@ gabble_jingle_transport_iface_parse_candidates (GabbleJingleTransportIface *self
return virtual_method (self, node, error);
}
+/* Appends <transport /> node under parent, to be used with the
+ * specified jingle action. Returns the new node. */
+LmMessageNode *
+gabble_jingle_transport_iface_produce_node (GabbleJingleTransportIface *self,
+ LmMessageNode *parent, JingleAction action)
+{
+ LmMessageNode *(*virtual_method)(GabbleJingleTransportIface *,
+ LmMessageNode *, JingleAction) =
+ GABBLE_JINGLE_TRANSPORT_IFACE_GET_CLASS (self)->produce_node;
+
+ g_assert (virtual_method != NULL);
+ return virtual_method (self, parent, action);
+}
+
/* Takes in a list of slice-allocated JingleCandidate structs */
void
gabble_jingle_transport_iface_new_local_candidates (GabbleJingleTransportIface *self,
@@ -64,17 +78,6 @@ gabble_jingle_transport_iface_new_local_candidates (GabbleJingleTransportIface *
virtual_method (self, candidates);
}
-void
-gabble_jingle_transport_iface_retransmit_candidates (GabbleJingleTransportIface *self,
- gboolean all)
-{
- void (*virtual_method)(GabbleJingleTransportIface *, gboolean) =
- GABBLE_JINGLE_TRANSPORT_IFACE_GET_CLASS (self)->retransmit_candidates;
-
- g_assert (virtual_method != NULL);
- virtual_method (self, all);
-}
-
GList *
gabble_jingle_transport_iface_get_remote_candidates (
GabbleJingleTransportIface *self)
diff --git a/src/jingle-transport-iface.h b/src/jingle-transport-iface.h
index 0432898..ac6d68c 100644
--- a/src/jingle-transport-iface.h
+++ b/src/jingle-transport-iface.h
@@ -43,9 +43,9 @@ struct _GabbleJingleTransportIfaceClass {
void (*parse_candidates) (GabbleJingleTransportIface *,
LmMessageNode *, GError **);
- void (*new_local_candidates) (GabbleJingleTransportIface *,
- GList *);
- void (*retransmit_candidates) (GabbleJingleTransportIface *, gboolean);
+ void (*new_local_candidates) (GabbleJingleTransportIface *, GList *);
+ LmMessageNode * (*produce_node) (GabbleJingleTransportIface *,
+ LmMessageNode *, JingleAction);
GList * (*get_remote_candidates) (GabbleJingleTransportIface *);
JingleTransportType (*get_transport_type) (void);
};
@@ -66,7 +66,8 @@ GType gabble_jingle_transport_iface_get_type (void);
void gabble_jingle_transport_iface_parse_candidates (GabbleJingleTransportIface *,
LmMessageNode *, GError **);
void gabble_jingle_transport_iface_new_local_candidates (GabbleJingleTransportIface *, GList *);
-void gabble_jingle_transport_iface_retransmit_candidates (GabbleJingleTransportIface *, gboolean);
+LmMessageNode *gabble_jingle_transport_iface_produce_node (GabbleJingleTransportIface *,
+ LmMessageNode *, JingleAction);
GList *gabble_jingle_transport_iface_get_remote_candidates (GabbleJingleTransportIface *);
JingleTransportType gabble_jingle_transport_iface_get_transport_type (GabbleJingleTransportIface *);
--
1.5.6.5
More information about the telepathy-commits
mailing list