polari-room.h 2.48 KB
Newer Older
Florian Müllner's avatar
Florian Müllner committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
 * Copyright (C) 2013 Red Hat, Inc.
 *
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.";
 */

19
#pragma once
Florian Müllner's avatar
Florian Müllner committed
20 21 22

#include <glib-object.h>

23
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
Florian Müllner's avatar
Florian Müllner committed
24
#include <telepathy-glib/telepathy-glib.h>
25
G_GNUC_END_IGNORE_DEPRECATIONS
Florian Müllner's avatar
Florian Müllner committed
26 27 28 29

G_BEGIN_DECLS

#define POLARI_TYPE_ROOM            (polari_room_get_type())
30
G_DECLARE_FINAL_TYPE (PolariRoom, polari_room, POLARI, ROOM, GObject)
Florian Müllner's avatar
Florian Müllner committed
31

32 33 34 35
const char *polari_room_get_channel_error (PolariRoom *room);
void        polari_room_set_channel_error (PolariRoom *room,
                                           const char *channel_error);

Florian Müllner's avatar
Florian Müllner committed
36
gboolean polari_room_should_highlight_message (PolariRoom *room,
37 38
                                               const char *sender,
                                               const char *message);
Florian Müllner's avatar
Florian Müllner committed
39

40 41
void  polari_room_set_topic (PolariRoom *room, const char *topic);

42 43 44
void  polari_room_add_member    (PolariRoom *room, TpContact *member);
void  polari_room_remove_member (PolariRoom *room, TpContact *member);

45
void polari_room_send_identify_message_async (PolariRoom          *room,
46
                                              const char          *command,
47 48 49 50 51 52 53 54
                                              const char          *username,
                                              const char          *password,
                                              GAsyncReadyCallback  callback,
                                              gpointer             user_data);
gboolean polari_room_send_identify_message_finish (PolariRoom    *room,
                                                   GAsyncResult  *res,
                                                   GError       **error);

55 56 57
char *polari_create_room_id (TpAccount    *account,
                             const char   *name,
                             TpHandleType  type);
58

Florian Müllner's avatar
Florian Müllner committed
59
G_END_DECLS