| 80 g_object_class_install_property(gobject_class, PROP_SID, |
80 g_object_class_install_property(gobject_class, PROP_SID, |
| 81 g_param_spec_string("sid", |
81 g_param_spec_string("sid", |
| 82 "Session ID", |
82 "Session ID", |
| 83 "The unique session ID of the Jingle Session.", |
83 "The unique session ID of the Jingle Session.", |
| 84 NULL, |
84 NULL, |
| 85 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)); |
85 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
| 86 |
86 |
| 87 g_object_class_install_property(gobject_class, PROP_JS, |
87 g_object_class_install_property(gobject_class, PROP_JS, |
| 88 g_param_spec_pointer("js", |
88 g_param_spec_pointer("js", |
| 89 "JabberStream", |
89 "JabberStream", |
| 90 "The Jabber stream associated with this session.", |
90 "The Jabber stream associated with this session.", |
| 91 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)); |
91 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
| 92 |
92 |
| 93 g_object_class_install_property(gobject_class, PROP_REMOTE_JID, |
93 g_object_class_install_property(gobject_class, PROP_REMOTE_JID, |
| 94 g_param_spec_string("remote-jid", |
94 g_param_spec_string("remote-jid", |
| 95 "Remote JID", |
95 "Remote JID", |
| 96 "The JID of the remote participant.", |
96 "The JID of the remote participant.", |
| 97 NULL, |
97 NULL, |
| 98 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)); |
98 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
| 99 |
99 |
| 100 g_object_class_install_property(gobject_class, PROP_LOCAL_JID, |
100 g_object_class_install_property(gobject_class, PROP_LOCAL_JID, |
| 101 g_param_spec_string("local-jid", |
101 g_param_spec_string("local-jid", |
| 102 "Local JID", |
102 "Local JID", |
| 103 "The JID of the local participant.", |
103 "The JID of the local participant.", |
| 104 NULL, |
104 NULL, |
| 105 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)); |
105 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
| 106 |
106 |
| 107 g_object_class_install_property(gobject_class, PROP_IS_INITIATOR, |
107 g_object_class_install_property(gobject_class, PROP_IS_INITIATOR, |
| 108 g_param_spec_boolean("is-initiator", |
108 g_param_spec_boolean("is-initiator", |
| 109 "Is Initiator", |
109 "Is Initiator", |
| 110 "Whether or not the local JID is the initiator of the session.", |
110 "Whether or not the local JID is the initiator of the session.", |
| 111 FALSE, |
111 FALSE, |
| 112 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)); |
112 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
| 113 |
113 |
| 114 g_object_class_install_property(gobject_class, PROP_STATE, |
114 g_object_class_install_property(gobject_class, PROP_STATE, |
| 115 g_param_spec_boolean("state", |
115 g_param_spec_boolean("state", |
| 116 "State", |
116 "State", |
| 117 "The state of the session (PENDING=FALSE, ACTIVE=TRUE).", |
117 "The state of the session (PENDING=FALSE, ACTIVE=TRUE).", |
| 118 FALSE, |
118 FALSE, |
| 119 G_PARAM_READABLE)); |
119 G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); |
| 120 |
120 |
| 121 g_object_class_install_property(gobject_class, PROP_CONTENTS, |
121 g_object_class_install_property(gobject_class, PROP_CONTENTS, |
| 122 g_param_spec_pointer("contents", |
122 g_param_spec_pointer("contents", |
| 123 "Contents", |
123 "Contents", |
| 124 "The active contents contained within this session", |
124 "The active contents contained within this session", |
| 125 G_PARAM_READABLE)); |
125 G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); |
| 126 |
126 |
| 127 g_object_class_install_property(gobject_class, PROP_PENDING_CONTENTS, |
127 g_object_class_install_property(gobject_class, PROP_PENDING_CONTENTS, |
| 128 g_param_spec_pointer("pending-contents", |
128 g_param_spec_pointer("pending-contents", |
| 129 "Pending contents", |
129 "Pending contents", |
| 130 "The pending contents contained within this session", |
130 "The pending contents contained within this session", |
| 131 G_PARAM_READABLE)); |
131 G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); |
| 132 |
132 |
| 133 g_type_class_add_private(klass, sizeof(JingleSessionPrivate)); |
133 g_type_class_add_private(klass, sizeof(JingleSessionPrivate)); |
| 134 } |
134 } |
| 135 |
135 |
| 136 static void |
136 static void |
| 552 |
554 |
| 553 if (content) { |
555 if (content) { |
| 554 session->priv->contents = |
556 session->priv->contents = |
| 555 g_list_remove(session->priv->contents, content); |
557 g_list_remove(session->priv->contents, content); |
| 556 g_object_unref(content); |
558 g_object_unref(content); |
| |
559 |
| |
560 g_object_notify(G_OBJECT(session), "contents"); |
| 557 } |
561 } |
| 558 } |
562 } |
| 559 |
563 |
| 560 void |
564 void |
| 561 jingle_session_add_pending_content(JingleSession *session, JingleContent* content) |
565 jingle_session_add_pending_content(JingleSession *session, JingleContent* content) |
| 562 { |
566 { |
| 563 session->priv->pending_contents = |
567 session->priv->pending_contents = |
| 564 g_list_append(session->priv->pending_contents, content); |
568 g_list_append(session->priv->pending_contents, content); |
| 565 jingle_content_set_session(content, session); |
569 jingle_content_set_session(content, session); |
| |
570 |
| |
571 g_object_notify(G_OBJECT(session), "pending-contents"); |
| 566 } |
572 } |
| 567 |
573 |
| 568 void |
574 void |
| 569 jingle_session_remove_pending_content(JingleSession *session, const gchar *name, const gchar *creator) |
575 jingle_session_remove_pending_content(JingleSession *session, const gchar *name, const gchar *creator) |
| 570 { |
576 { |