From a687b7c513d3bb967781f17dc5d247161bcffd8c Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Thu, 24 Jan 2008 16:33:33 +0000 Subject: Remove EmpathyPresence object and have "presence" and "presence-message" properties directly in EmpathyContact svn path=/trunk/; revision=601 --- python/pyempathy/pyempathy.defs | 137 +++++++++++------------------------- python/pyempathy/pyempathy.override | 1 - 2 files changed, 41 insertions(+), 97 deletions(-) (limited to 'python/pyempathy') diff --git a/python/pyempathy/pyempathy.defs b/python/pyempathy/pyempathy.defs index f6c7e0b80..7f7381fa7 100644 --- a/python/pyempathy/pyempathy.defs +++ b/python/pyempathy/pyempathy.defs @@ -77,13 +77,6 @@ (gtype-id "EMPATHY_TYPE_MESSAGE") ) -(define-object Presence - (in-module "Empathy") - (parent "GObject") - (c-name "EmpathyPresence") - (gtype-id "EMPATHY_TYPE_PRESENCE") -) - (define-object TpCall (in-module "Empathy") (parent "GObject") @@ -602,7 +595,7 @@ (define-method get_presence (of-object "EmpathyContact") (c-name "empathy_contact_get_presence") - (return-type "EmpathyPresence*") + (return-type "McPresence") ) (define-method set_presence @@ -610,7 +603,22 @@ (c-name "empathy_contact_set_presence") (return-type "none") (parameters - '("EmpathyPresence*" "presence") + '("McPresence" "presence") + ) +) + +(define-method get_presence_message + (of-object "EmpathyContact") + (c-name "empathy_contact_get_presence_message") + (return-type "const-gchar*") +) + +(define-method set_presence_message + (of-object "EmpathyContact") + (c-name "empathy_contact_set_presence_message") + (return-type "none") + (parameters + '("const-gchar*" "message") ) ) @@ -1205,93 +1213,6 @@ -;; From empathy-presence.h - -(define-function empathy_presence_get_type - (c-name "empathy_presence_get_type") - (return-type "GType") -) - -(define-function empathy_presence_new - (c-name "empathy_presence_new") - (is-constructor-of "EmpathyPresence") - (return-type "EmpathyPresence*") -) - -(define-function empathy_presence_new_full - (c-name "empathy_presence_new_full") - (return-type "EmpathyPresence*") - (parameters - '("McPresence" "state") - '("const-gchar*" "status") - ) -) - -(define-method get_state - (of-object "EmpathyPresence") - (c-name "empathy_presence_get_state") - (return-type "McPresence") -) - -(define-method get_status - (of-object "EmpathyPresence") - (c-name "empathy_presence_get_status") - (return-type "const-gchar*") -) - -(define-method set_state - (of-object "EmpathyPresence") - (c-name "empathy_presence_set_state") - (return-type "none") - (parameters - '("McPresence" "state") - ) -) - -(define-method set_status - (of-object "EmpathyPresence") - (c-name "empathy_presence_set_status") - (return-type "none") - (parameters - '("const-gchar*" "status") - ) -) - -(define-function empathy_presence_sort_func - (c-name "empathy_presence_sort_func") - (return-type "gint") - (parameters - '("gconstpointer" "a") - '("gconstpointer" "b") - ) -) - -(define-function empathy_presence_state_get_default_status - (c-name "empathy_presence_state_get_default_status") - (return-type "const-gchar*") - (parameters - '("McPresence" "state") - ) -) - -(define-function empathy_presence_state_to_str - (c-name "empathy_presence_state_to_str") - (return-type "const-gchar*") - (parameters - '("McPresence" "state") - ) -) - -(define-function empathy_presence_state_from_str - (c-name "empathy_presence_state_from_str") - (return-type "McPresence") - (parameters - '("const-gchar*" "str") - ) -) - - - ;; From empathy-status-presets.h (define-function empathy_status_presets_get_all @@ -2058,6 +1979,30 @@ ) ) +(define-function empathy_presence_get_default_message + (c-name "empathy_presence_get_default_message") + (return-type "const-gchar*") + (parameters + '("McPresence" "presence") + ) +) + +(define-function empathy_presence_to_str + (c-name "empathy_presence_to_str") + (return-type "const-gchar*") + (parameters + '("McPresence" "presence") + ) +) + +(define-function empathy_presence_from_str + (c-name "empathy_presence_from_str") + (return-type "McPresence") + (parameters + '("const-gchar*" "str") + ) +) + ;; From tp-stream-engine-gen.h diff --git a/python/pyempathy/pyempathy.override b/python/pyempathy/pyempathy.override index a21700fca..7425972ea 100644 --- a/python/pyempathy/pyempathy.override +++ b/python/pyempathy/pyempathy.override @@ -15,7 +15,6 @@ headers #include "empathy-idle.h" #include "empathy-log-manager.h" #include "empathy-message.h" -#include "empathy-presence.h" #include "empathy-status-presets.h" #include "empathy-time.h" #include "empathy-tp-chat.h" -- cgit v1.2.3