]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-message.h
Updated Dutch translation master
[empathy.git] / libempathy / empathy-message.h
index d07565b06da2e9ae56d71fc8078330330381bc08..ba115b6b7d89b0167d8478a448a14e3c6a1e23f7 100644 (file)
@@ -1,7 +1,7 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
  * Copyright (C) 2004-2007 Imendio AB
- * Copyright (C) 2007 Collabora Ltd.
+ * Copyright (C) 2007-2008 Collabora Ltd.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -15,8 +15,8 @@
  *
  * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA  02110-1301  USA
  *
  * Authors: Mikael Hallendal <micke@imendio.com>
  *          Xavier Claessens <xclaesse@gmail.com>
 #define __EMPATHY_MESSAGE_H__
 
 #include <glib-object.h>
+#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-logger/telepathy-logger.h>
 
 #include "empathy-contact.h"
-#include "empathy-time.h"
 
 G_BEGIN_DECLS
 
-#define EMPATHY_TYPE_MESSAGE         (empathy_message_get_gtype ())
+#define EMPATHY_TYPE_MESSAGE         (empathy_message_get_type ())
 #define EMPATHY_MESSAGE(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_MESSAGE, EmpathyMessage))
 #define EMPATHY_MESSAGE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_MESSAGE, EmpathyMessageClass))
 #define EMPATHY_IS_MESSAGE(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_MESSAGE))
@@ -44,42 +45,41 @@ typedef struct _EmpathyMessageClass EmpathyMessageClass;
 
 struct _EmpathyMessage {
        GObject parent;
+       gpointer priv;
 };
 
 struct _EmpathyMessageClass {
        GObjectClass parent_class;
 };
 
-typedef enum {
-       EMPATHY_MESSAGE_TYPE_NORMAL,
-       EMPATHY_MESSAGE_TYPE_ACTION,
-       EMPATHY_MESSAGE_TYPE_NOTICE,
-       EMPATHY_MESSAGE_TYPE_AUTO_REPLY,
-       EMPATHY_MESSAGE_TYPE_LAST
-} EmpathyMessageType;
-
-GType              empathy_message_get_gtype         (void) G_GNUC_CONST;
-EmpathyMessage *   empathy_message_new               (const gchar        *body);
-EmpathyMessageType empathy_message_get_type          (EmpathyMessage     *message);
-void               empathy_message_set_type          (EmpathyMessage     *message,
-                                                     EmpathyMessageType  type);
-EmpathyContact *   empathy_message_get_sender        (EmpathyMessage     *message);
-void               empathy_message_set_sender        (EmpathyMessage     *message,
-                                                     EmpathyContact     *contact);
-EmpathyContact *   empathy_message_get_receiver      (EmpathyMessage     *message);
-void               empathy_message_set_receiver      (EmpathyMessage     *message,
-                                                     EmpathyContact     *contact);
-const gchar *      empathy_message_get_body          (EmpathyMessage     *message);
-void               empathy_message_set_body          (EmpathyMessage     *message,
-                                                     const gchar        *body);
-time_t             empathy_message_get_timestamp     (EmpathyMessage     *message);
-void               empathy_message_set_timestamp     (EmpathyMessage     *message,
-                                                     time_t              timestamp);
-GDate *            empathy_message_get_date_and_time (EmpathyMessage     *message,
-                                                     time_t             *timestamp);
-gboolean           empathy_message_should_highlight  (EmpathyMessage     *message);
-EmpathyMessageType empathy_message_type_from_str     (const gchar        *type_str);
-const gchar *      empathy_message_type_to_str       (EmpathyMessageType  type);
+GType                    empathy_message_get_type          (void) G_GNUC_CONST;
+
+EmpathyMessage *         empathy_message_from_tpl_log_event (TplEvent                *logevent);
+EmpathyMessage *         empathy_message_new_from_tp_message (TpMessage *tp_msg,
+                                                             gboolean incoming);
+
+TpMessage *              empathy_message_get_tp_message    (EmpathyMessage *message);
+
+TpChannelTextMessageType empathy_message_get_tptype        (EmpathyMessage           *message);
+EmpathyContact *         empathy_message_get_sender        (EmpathyMessage           *message);
+void                     empathy_message_set_sender        (EmpathyMessage           *message,
+                                                           EmpathyContact           *contact);
+EmpathyContact *         empathy_message_get_receiver      (EmpathyMessage           *message);
+void                     empathy_message_set_receiver      (EmpathyMessage           *message,
+                                                           EmpathyContact           *contact);
+const gchar *            empathy_message_get_body          (EmpathyMessage           *message);
+const gchar *            empathy_message_get_token         (EmpathyMessage           *message);
+const gchar *            empathy_message_get_supersedes    (EmpathyMessage           *message);
+gboolean                 empathy_message_is_edit           (EmpathyMessage           *message);
+gint64                   empathy_message_get_timestamp     (EmpathyMessage           *message);
+gint64                   empathy_message_get_original_timestamp (EmpathyMessage      *message);
+gboolean                 empathy_message_is_backlog        (EmpathyMessage           *message);
+gboolean                 empathy_message_is_incoming       (EmpathyMessage           *message);
+
+TpChannelTextMessageType empathy_message_type_from_str     (const gchar              *type_str);
+const gchar *            empathy_message_type_to_str       (TpChannelTextMessageType  type);
+
+gboolean                 empathy_message_equal (EmpathyMessage *message1, EmpathyMessage *message2);
 
 G_END_DECLS