summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--telepathy-glib/text-mixin.c35
-rw-r--r--telepathy-glib/text-mixin.h40
-rw-r--r--tests/lib/echo-chan.c6
-rw-r--r--tests/lib/textchan-group.c6
-rw-r--r--tests/lib/textchan-null.c6
5 files changed, 78 insertions, 15 deletions
diff --git a/telepathy-glib/text-mixin.c b/telepathy-glib/text-mixin.c
index e9f6848b4..89bd09fa2 100644
--- a/telepathy-glib/text-mixin.c
+++ b/telepathy-glib/text-mixin.c
@@ -43,6 +43,8 @@
* you should first call tp_text_mixin_iface_init(), then call
* tp_svc_channel_type_text_implement_send() to register your implementation
* of the Send method.
+ *
+ * Deprecated: Use #TpMessageMixin instead.
*/
#include "config.h"
@@ -60,6 +62,9 @@
#include "debug-internal.h"
+/* Deprecated module can use deprecated APIs */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
struct _TpTextMixinPrivate
{
TpHandleRepoIface *contacts_repo;
@@ -100,6 +105,7 @@ typedef struct
* <!--no documentation beyond Returns: needed-->
*
* Returns: the quark used for storing mixin offset on a GObjectClass
+ * Deprecated: Use #TpMessageMixin instead.
*/
GQuark
tp_text_mixin_class_get_offset_quark ()
@@ -118,6 +124,7 @@ tp_text_mixin_class_get_offset_quark ()
* <!--no documentation beyond Returns: needed-->
*
* Returns: the quark used for storing mixin offset on a GObject
+ * Deprecated: Use #TpMessageMixin instead.
*/
GQuark
tp_text_mixin_get_offset_quark ()
@@ -143,6 +150,8 @@ tp_text_mixin_get_offset_quark ()
* tp_text_mixin_class_init ((GObjectClass *) klass,
* G_STRUCT_OFFSET (SomeObjectClass, text_mixin));
* </programlisting></informalexample>
+ *
+ * Deprecated: Use #TpMessageMixin instead.
*/
void
@@ -175,6 +184,8 @@ tp_text_mixin_class_init (GObjectClass *obj_cls, glong offset)
* G_STRUCT_OFFSET (SomeObject, text_mixin),
* self->contact_repo);
* </programlisting></informalexample>
+ *
+ * Deprecated: Use tp_message_mixin_init() instead.
*/
void
tp_text_mixin_init (GObject *obj,
@@ -208,6 +219,8 @@ tp_text_mixin_init (GObject *obj,
* by G_MAXUINT
*
* Set the supported message types.
+ *
+ * Deprecated: Use #TpMessageMixin instead.
*/
void
tp_text_mixin_set_message_types (GObject *obj,
@@ -250,6 +263,8 @@ _pending_free (_PendingMessage *msg,
* @obj: An object with this mixin.
*
* Free resources held by the text mixin.
+ *
+ * Deprecated: Use tp_message_mixin_finalize() instead.
*/
void
tp_text_mixin_finalize (GObject *obj)
@@ -282,6 +297,8 @@ tp_text_mixin_finalize (GObject *obj)
*
* Returns: %TRUE on success; %FALSE if the message was lost due to the memory
* limit.
+ *
+ * Deprecated: Use tp_message_mixin_take_received() instead.
*/
gboolean
tp_text_mixin_receive_with_flags (GObject *obj,
@@ -355,6 +372,8 @@ tp_text_mixin_receive_with_flags (GObject *obj,
*
* Returns: %TRUE on success; %FALSE if the message was lost due to the memory
* limit.
+ *
+ * Deprecated: Use tp_message_mixin_take_received() instead.
*/
gboolean
tp_text_mixin_receive (GObject *obj,
@@ -389,6 +408,8 @@ compare_pending_message (gconstpointer haystack,
* on interface org.freedesktop.Telepathy.Channel.Type.Text
*
* Returns: TRUE if successful, FALSE if an error was thrown.
+ *
+ * Deprecated: Use #TpMessageMixin instead.
*/
gboolean
tp_text_mixin_acknowledge_pending_messages (GObject *obj,
@@ -470,6 +491,8 @@ tp_text_mixin_acknowledge_pending_messages_async (TpSvcChannelTypeText *iface,
* on interface org.freedesktop.Telepathy.Channel.Type.Text
*
* Returns: TRUE if successful, FALSE if an error was thrown.
+ *
+ * Deprecated: Use #TpMessageMixin instead.
*/
gboolean
tp_text_mixin_list_pending_messages (GObject *obj,
@@ -557,6 +580,8 @@ tp_text_mixin_list_pending_messages_async (TpSvcChannelTypeText *iface,
* taken from #TpChannelTextMessageType, through @ret.
*
* Returns: %TRUE on success
+ *
+ * Deprecated: Use #TpMessageMixin instead.
*/
gboolean
tp_text_mixin_get_message_types (GObject *obj,
@@ -594,6 +619,8 @@ tp_text_mixin_get_message_types_async (TpSvcChannelTypeText *iface,
* @obj: An object with this mixin
*
* Clear the pending message queue, deleting all messages.
+ *
+ * Deprecated: Use tp_message_mixin_clear() instead.
*/
void
tp_text_mixin_clear (GObject *obj)
@@ -618,6 +645,8 @@ tp_text_mixin_clear (GObject *obj)
* is placed in it, without incrementing the handle's reference count.
*
* Returns: %TRUE if there are pending messages
+ *
+ * Deprecated: Use tp_message_mixin_has_pending_messages() instead.
*/
gboolean
tp_text_mixin_has_pending_messages (GObject *obj,
@@ -640,6 +669,8 @@ tp_text_mixin_has_pending_messages (GObject *obj,
*
* Mark all pending messages as having been "rescued" from a channel that
* previously closed.
+ *
+ * Deprecated: Use tp_message_mixin_set_rescued() instead.
*/
void
tp_text_mixin_set_rescued (GObject *obj)
@@ -667,6 +698,8 @@ tp_text_mixin_set_rescued (GObject *obj)
* In addition to calling this function during interface initialization, the
* implementor is expected to call tp_svc_channel_type_text_implement_send(),
* providing a Send implementation.
+ *
+ * Deprecated: Use tp_message_mixin_text_iface_init() instead.
*/
void
tp_text_mixin_iface_init (gpointer g_iface,
@@ -682,3 +715,5 @@ tp_text_mixin_iface_init (gpointer g_iface,
/* send not implemented here */
#undef IMPLEMENT
}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
diff --git a/telepathy-glib/text-mixin.h b/telepathy-glib/text-mixin.h
index 297087ebd..7ecd7ffe0 100644
--- a/telepathy-glib/text-mixin.h
+++ b/telepathy-glib/text-mixin.h
@@ -23,6 +23,7 @@
#include <time.h>
+#include <telepathy-glib/defs.h>
#include <telepathy-glib/handle-repo.h>
#include <telepathy-glib/svc-channel.h>
#include "util.h"
@@ -75,34 +76,43 @@ struct _TpTextMixin {
#define TP_TEXT_MIXIN(o) \
((TpTextMixin *) tp_mixin_offset_cast (o, TP_TEXT_MIXIN_OFFSET (o)))
-GQuark tp_text_mixin_class_get_offset_quark (void);
-GQuark tp_text_mixin_get_offset_quark (void);
+GQuark tp_text_mixin_class_get_offset_quark (void) _TP_GNUC_DEPRECATED;
+GQuark tp_text_mixin_get_offset_quark (void) _TP_GNUC_DEPRECATED;
-void tp_text_mixin_class_init (GObjectClass *obj_cls, glong offset);
+void tp_text_mixin_class_init (GObjectClass *obj_cls, glong offset)
+ _TP_GNUC_DEPRECATED;
void tp_text_mixin_init (GObject *obj, glong offset,
- TpHandleRepoIface *contacts_repo);
-void tp_text_mixin_set_message_types (GObject *obj, ...);
-void tp_text_mixin_finalize (GObject *obj);
+ TpHandleRepoIface *contacts_repo)
+ _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_init);
+void tp_text_mixin_set_message_types (GObject *obj, ...) _TP_GNUC_DEPRECATED;
+void tp_text_mixin_finalize (GObject *obj)
+ _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_finalize);
gboolean tp_text_mixin_receive_with_flags (GObject *obj,
TpChannelTextMessageType type, TpHandle sender, time_t timestamp,
- const char *text, TpChannelTextMessageFlags flags);
+ const char *text, TpChannelTextMessageFlags flags)
+ _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_take_received);
gboolean tp_text_mixin_receive (GObject *obj, TpChannelTextMessageType type,
- TpHandle sender, time_t timestamp, const char *text);
+ TpHandle sender, time_t timestamp, const char *text)
+ _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_take_received);
gboolean tp_text_mixin_acknowledge_pending_messages (GObject *obj,
- const GArray * ids, GError **error);
+ const GArray * ids, GError **error) _TP_GNUC_DEPRECATED;
gboolean tp_text_mixin_list_pending_messages (GObject *obj, gboolean clear,
- GPtrArray ** ret, GError **error);
+ GPtrArray ** ret, GError **error) _TP_GNUC_DEPRECATED;
gboolean tp_text_mixin_get_message_types (GObject *obj, GArray **ret,
- GError **error);
-void tp_text_mixin_clear (GObject *obj);
+ GError **error) _TP_GNUC_DEPRECATED;
+void tp_text_mixin_clear (GObject *obj)
+ _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_clear);
gboolean tp_text_mixin_has_pending_messages (GObject *obj,
- TpHandle *first_sender);
-void tp_text_mixin_set_rescued (GObject *obj);
+ TpHandle *first_sender)
+ _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_has_pending_messages);
+void tp_text_mixin_set_rescued (GObject *obj)
+ _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_set_rescued);
-void tp_text_mixin_iface_init (gpointer g_iface, gpointer iface_data);
+void tp_text_mixin_iface_init (gpointer g_iface, gpointer iface_data)
+ _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_text_iface_init);
G_END_DECLS
diff --git a/tests/lib/echo-chan.c b/tests/lib/echo-chan.c
index a8f8ccabf..75f27d449 100644
--- a/tests/lib/echo-chan.c
+++ b/tests/lib/echo-chan.c
@@ -19,6 +19,10 @@
#include <telepathy-glib/channel-iface.h>
#include <telepathy-glib/svc-channel.h>
+/* This is for text-mixin unit tests, others should be using ExampleEcho2Channel
+ * which uses newer TpMessageMixin */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
static void text_iface_init (gpointer iface, gpointer data);
static void destroyable_iface_init (gpointer iface, gpointer data);
@@ -218,3 +222,5 @@ destroyable_iface_init (gpointer iface,
IMPLEMENT (destroy);
#undef IMPLEMENT
}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
diff --git a/tests/lib/textchan-group.c b/tests/lib/textchan-group.c
index f8c1445a4..710af4daa 100644
--- a/tests/lib/textchan-group.c
+++ b/tests/lib/textchan-group.c
@@ -21,6 +21,10 @@
#include <telepathy-glib/svc-channel.h>
#include <telepathy-glib/svc-generic.h>
+/* This is for text-mixin unit tests, others should be using ExampleEcho2Channel
+ * which uses newer TpMessageMixin */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
static void text_iface_init (gpointer iface, gpointer data);
static void password_iface_init (gpointer iface, gpointer data);
@@ -410,3 +414,5 @@ password_iface_init (gpointer iface, gpointer data)
IMPLEMENT (provide_password);
#undef IMPLEMENT
}
+
+G_GNUC_END_IGNORE_DEPRECATIONS
diff --git a/tests/lib/textchan-null.c b/tests/lib/textchan-null.c
index 5765944b5..64b156fe4 100644
--- a/tests/lib/textchan-null.c
+++ b/tests/lib/textchan-null.c
@@ -21,6 +21,10 @@
#include <telepathy-glib/svc-channel.h>
#include <telepathy-glib/svc-generic.h>
+/* This is for text-mixin unit tests, others should be using ExampleEcho2Channel
+ * which uses newer TpMessageMixin */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
static void text_iface_init (gpointer iface, gpointer data);
static void channel_iface_init (gpointer iface, gpointer data);
@@ -569,3 +573,5 @@ tp_tests_text_channel_get_props (TpTestsTextChannelNull *self)
g_strfreev (interfaces);
return props;
}
+
+G_GNUC_END_IGNORE_DEPRECATIONS