]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-log-manager.h
add myself to AUTHORS
[empathy.git] / libempathy / empathy-log-manager.h
index 606f38c6c02966163e65bdcc1e12becd77039ff6..25f1b5fcd2c141dca7dfb6c2136f8d16b9ec0bd9 100644 (file)
@@ -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: Xavier Claessens <xclaesse@gmail.com>
  */
 
 #include <glib-object.h>
 
-#include <libmissioncontrol/mc-account.h>
-
 #include "empathy-message.h"
+#include "empathy-dispatcher.h"
 
 G_BEGIN_DECLS
 
-#define EMPATHY_TYPE_LOG_MANAGER         (empathy_log_manager_get_type ())
-#define EMPATHY_LOG_MANAGER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_LOG_MANAGER, EmpathyLogManager))
-#define EMPATHY_LOG_MANAGER_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_LOG_MANAGER, EmpathyLogManagerClass))
-#define EMPATHY_IS_LOG_MANAGER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_LOG_MANAGER))
-#define EMPATHY_IS_LOG_MANAGER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_LOG_MANAGER))
-#define EMPATHY_LOG_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_LOG_MANAGER, EmpathyLogManagerClass))
+#define EMPATHY_TYPE_LOG_MANAGER (empathy_log_manager_get_type ())
+#define EMPATHY_LOG_MANAGER(o) \
+  (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_LOG_MANAGER, \
+                               EmpathyLogManager))
+#define EMPATHY_LOG_MANAGER_CLASS(k) \
+  (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_LOG_MANAGER, \
+                            EmpathyLogManagerClass))
+#define EMPATHY_IS_LOG_MANAGER(o) \
+  (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_LOG_MANAGER))
+#define EMPATHY_IS_LOG_MANAGER_CLASS(k) \
+  (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_LOG_MANAGER))
+#define EMPATHY_LOG_MANAGER_GET_CLASS(o) \
+  (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_LOG_MANAGER, \
+                              EmpathyLogManagerClass))
 
-typedef struct _EmpathyLogManager      EmpathyLogManager;
+typedef struct _EmpathyLogManager EmpathyLogManager;
 typedef struct _EmpathyLogManagerClass EmpathyLogManagerClass;
-typedef struct _EmpathyLogManagerPriv  EmpathyLogManagerPriv;
-typedef struct _EmpathyLogSearchHit    EmpathyLogSearchHit;
+typedef struct _EmpathyLogSearchHit EmpathyLogSearchHit;
 
-struct _EmpathyLogManager {
-       GObject parent;
+struct _EmpathyLogManager
+{
+  GObject parent;
+  gpointer priv;
 };
 
-struct _EmpathyLogManagerClass {
-       GObjectClass parent_class;
+struct _EmpathyLogManagerClass
+{
+  GObjectClass parent_class;
 };
 
-struct _EmpathyLogSearchHit {
-       McAccount *account;
-       gchar     *chat_id;
-       gboolean   is_chatroom;
-       gchar     *filename;
-       gchar     *date;
+struct _EmpathyLogSearchHit
+{
+  TpAccount *account;
+  gchar     *chat_id;
+  gboolean   is_chatroom;
+  gchar     *filename;
+  gchar     *date;
 };
 
-GType              empathy_log_manager_get_type              (void) G_GNUC_CONST;
-EmpathyLogManager *empathy_log_manager_new                   (void);
-void               empathy_log_manager_add_message           (EmpathyLogManager *manager,
-                                                             const gchar       *chat_id,
-                                                             gboolean           chatroom,
-                                                             EmpathyMessage     *message);
-gboolean           empathy_log_manager_exists                (EmpathyLogManager *manager,
-                                                             McAccount         *account,
-                                                             const gchar       *chat_id,
-                                                             gboolean           chatroom);
-GList *            empathy_log_manager_get_dates             (EmpathyLogManager *manager,
-                                                             McAccount         *account,
-                                                             const gchar       *chat_id,
-                                                             gboolean           chatroom);
-GList *            empathy_log_manager_get_messages_for_file (EmpathyLogManager *manager,
-                                                             const gchar       *filename);
-GList *            empathy_log_manager_get_messages_for_date (EmpathyLogManager *manager,
-                                                             McAccount         *account,
-                                                             const gchar       *chat_id,
-                                                             gboolean           chatroom,
-                                                             const gchar       *date);
-GList *            empathy_log_manager_get_last_messages     (EmpathyLogManager *manager,
-                                                             McAccount         *account,
-                                                             const gchar       *chat_id,
-                                                             gboolean           chatroom);
-GList *            empathy_log_manager_get_messages_for_file (EmpathyLogManager *manager,
-                                                             const gchar       *filename);
-GList *            empathy_log_manager_get_chats             (EmpathyLogManager *manager,
-                                                             McAccount         *account);
-GList *            empathy_log_manager_search_new            (EmpathyLogManager *manager,
-                                                             const gchar       *text);
-void               empathy_log_manager_search_free           (GList             *hits);
-gchar *            empathy_log_manager_get_date_readable     (const gchar       *date);
+typedef gboolean (*EmpathyLogMessageFilter) (EmpathyMessage *message,
+    gpointer user_data);
+
+GType empathy_log_manager_get_type (void) G_GNUC_CONST;
+EmpathyLogManager *empathy_log_manager_dup_singleton (void);
+gboolean empathy_log_manager_add_message (EmpathyLogManager *manager,
+    const gchar *chat_id, gboolean chatroom, EmpathyMessage *message,
+    GError **error);
+gboolean empathy_log_manager_exists (EmpathyLogManager *manager,
+    TpAccount *account, const gchar *chat_id, gboolean chatroom);
+GList *empathy_log_manager_get_dates (EmpathyLogManager *manager,
+    TpAccount *account, const gchar *chat_id, gboolean chatroom);
+GList *empathy_log_manager_get_messages_for_date (EmpathyLogManager *manager,
+    TpAccount *account, const gchar *chat_id, gboolean chatroom,
+    const gchar *date);
+GList *empathy_log_manager_get_filtered_messages (EmpathyLogManager *manager,
+    TpAccount *account, const gchar *chat_id, gboolean chatroom,
+    guint num_messages, EmpathyLogMessageFilter filter, gpointer user_data);
+GList *empathy_log_manager_get_chats (EmpathyLogManager *manager,
+    TpAccount *account);
+GList *empathy_log_manager_search_new (EmpathyLogManager *manager,
+    const gchar *text);
+void empathy_log_manager_search_free (GList *hits);
+gchar *empathy_log_manager_get_date_readable (const gchar *date);
+void empathy_log_manager_search_hit_free (EmpathyLogSearchHit *hit);
+void empathy_log_manager_observe (EmpathyLogManager *log_manager,
+    EmpathyDispatcher *dispatcher);
 
 G_END_DECLS