| 96 |
99 |
| 97 gobject_class->finalize = jingle_session_finalize; |
100 gobject_class->finalize = jingle_session_finalize; |
| 98 gobject_class->set_property = jingle_session_set_property; |
101 gobject_class->set_property = jingle_session_set_property; |
| 99 gobject_class->get_property = jingle_session_get_property; |
102 gobject_class->get_property = jingle_session_get_property; |
| 100 |
103 |
| 101 g_object_class_install_property(gobject_class, PROP_SID, |
104 properties[PROP_SID] = g_param_spec_string("sid", |
| 102 g_param_spec_string("sid", |
|
| 103 "Session ID", |
105 "Session ID", |
| 104 "The unique session ID of the Jingle Session.", |
106 "The unique session ID of the Jingle Session.", |
| 105 NULL, |
107 NULL, |
| 106 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
108 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
| 107 |
109 g_object_class_install_property(gobject_class, PROP_SID, |
| 108 g_object_class_install_property(gobject_class, PROP_JS, |
110 properties[PROP_SID]); |
| 109 g_param_spec_pointer("js", |
111 |
| |
112 properties[PROP_JS] = g_param_spec_pointer("js", |
| 110 "JabberStream", |
113 "JabberStream", |
| 111 "The Jabber stream associated with this session.", |
114 "The Jabber stream associated with this session.", |
| 112 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
115 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
| 113 |
116 g_object_class_install_property(gobject_class, PROP_JS, |
| 114 g_object_class_install_property(gobject_class, PROP_REMOTE_JID, |
117 properties[PROP_JS]); |
| 115 g_param_spec_string("remote-jid", |
118 |
| |
119 properties[PROP_REMOTE_JID] = g_param_spec_string("remote-jid", |
| 116 "Remote JID", |
120 "Remote JID", |
| 117 "The JID of the remote participant.", |
121 "The JID of the remote participant.", |
| 118 NULL, |
122 NULL, |
| 119 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
123 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
| 120 |
124 g_object_class_install_property(gobject_class, PROP_REMOTE_JID, |
| 121 g_object_class_install_property(gobject_class, PROP_LOCAL_JID, |
125 properties[PROP_REMOTE_JID]); |
| 122 g_param_spec_string("local-jid", |
126 |
| |
127 properties[PROP_LOCAL_JID] = g_param_spec_string("local-jid", |
| 123 "Local JID", |
128 "Local JID", |
| 124 "The JID of the local participant.", |
129 "The JID of the local participant.", |
| 125 NULL, |
130 NULL, |
| 126 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
131 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
| 127 |
132 g_object_class_install_property(gobject_class, PROP_LOCAL_JID, |
| 128 g_object_class_install_property(gobject_class, PROP_IS_INITIATOR, |
133 properties[PROP_LOCAL_JID]); |
| 129 g_param_spec_boolean("is-initiator", |
134 |
| |
135 properties[PROP_IS_INITIATOR] = g_param_spec_boolean("is-initiator", |
| 130 "Is Initiator", |
136 "Is Initiator", |
| 131 "Whether or not the local JID is the initiator of the session.", |
137 "Whether or not the local JID is the initiator of the session.", |
| 132 FALSE, |
138 FALSE, |
| 133 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
139 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
| 134 |
140 g_object_class_install_property(gobject_class, PROP_IS_INITIATOR, |
| 135 g_object_class_install_property(gobject_class, PROP_STATE, |
141 properties[PROP_IS_INITIATOR]); |
| 136 g_param_spec_boolean("state", |
142 |
| |
143 properties[PROP_STATE] = g_param_spec_boolean("state", |
| 137 "State", |
144 "State", |
| 138 "The state of the session (PENDING=FALSE, ACTIVE=TRUE).", |
145 "The state of the session (PENDING=FALSE, ACTIVE=TRUE).", |
| 139 FALSE, |
146 FALSE, |
| 140 G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); |
147 G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); |
| 141 |
148 g_object_class_install_property(gobject_class, PROP_STATE, |
| 142 g_object_class_install_property(gobject_class, PROP_CONTENTS, |
149 properties[PROP_STATE]); |
| 143 g_param_spec_pointer("contents", |
150 |
| |
151 properties[PROP_CONTENTS] = g_param_spec_pointer("contents", |
| 144 "Contents", |
152 "Contents", |
| 145 "The active contents contained within this session", |
153 "The active contents contained within this session", |
| 146 G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); |
154 G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); |
| 147 |
155 g_object_class_install_property(gobject_class, PROP_CONTENTS, |
| 148 g_object_class_install_property(gobject_class, PROP_PENDING_CONTENTS, |
156 properties[PROP_CONTENTS]); |
| 149 g_param_spec_pointer("pending-contents", |
157 |
| |
158 properties[PROP_PENDING_CONTENTS] = g_param_spec_pointer("pending-contents", |
| 150 "Pending contents", |
159 "Pending contents", |
| 151 "The pending contents contained within this session", |
160 "The pending contents contained within this session", |
| 152 G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); |
161 G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); |
| |
162 g_object_class_install_property(gobject_class, PROP_PENDING_CONTENTS, |
| |
163 properties[PROP_PENDING_CONTENTS]); |
| 153 |
164 |
| 154 g_type_class_add_private(klass, sizeof(JingleSessionPrivate)); |
165 g_type_class_add_private(klass, sizeof(JingleSessionPrivate)); |
| 155 } |
166 } |
| 156 |
167 |
| 157 static void |
168 static void |
| 576 if (content) { |
587 if (content) { |
| 577 session->priv->contents = |
588 session->priv->contents = |
| 578 g_list_remove(session->priv->contents, content); |
589 g_list_remove(session->priv->contents, content); |
| 579 g_object_unref(content); |
590 g_object_unref(content); |
| 580 |
591 |
| 581 g_object_notify(G_OBJECT(session), "contents"); |
592 g_object_notify_by_pspec(G_OBJECT(session), properties[PROP_CONTENTS]); |
| 582 } |
593 } |
| 583 } |
594 } |
| 584 |
595 |
| 585 void |
596 void |
| 586 jingle_session_add_pending_content(JingleSession *session, JingleContent* content) |
597 jingle_session_add_pending_content(JingleSession *session, JingleContent* content) |
| 587 { |
598 { |
| 588 session->priv->pending_contents = |
599 session->priv->pending_contents = |
| 589 g_list_append(session->priv->pending_contents, content); |
600 g_list_append(session->priv->pending_contents, content); |
| 590 jingle_content_set_session(content, session); |
601 jingle_content_set_session(content, session); |
| 591 |
602 |
| 592 g_object_notify(G_OBJECT(session), "pending-contents"); |
603 g_object_notify_by_pspec(G_OBJECT(session), properties[PROP_PENDING_CONTENTS]); |
| 593 } |
604 } |
| 594 |
605 |
| 595 void |
606 void |
| 596 jingle_session_remove_pending_content(JingleSession *session, const gchar *name, const gchar *creator) |
607 jingle_session_remove_pending_content(JingleSession *session, const gchar *name, const gchar *creator) |
| 597 { |
608 { |