-
Notifications
You must be signed in to change notification settings - Fork 5
/
pidgin-helpers.h
65 lines (49 loc) · 2.53 KB
/
pidgin-helpers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
* Off-the-Record Messaging plugin for pidgin
* Copyright (C) 2004-2018 Ian Goldberg, Rob Smits,
* Chris Alexander, Willy Lew,
* Nikita Borisov
* The pidgin-otrng contributors
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* 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 General Public License for more details.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __OTRG_PIDGIN_HELPERS_H__
#define __OTRG_PIDGIN_HELPERS_H__
#include <stdio.h>
/* Purple headers */
#include <account.h>
#include <libotr-ng/messaging.h>
#include "plugin-conversation.h"
otrng_client_id_s protocol_and_account_to_client_id(const char *protocol,
const char *account);
otrng_client_id_s purple_account_to_client_id(const PurpleAccount *account);
PurpleAccount *protocol_and_account_to_purple_account(const char *protocol,
const char *accountname);
PurpleAccount *client_id_to_purple_account(const otrng_client_id_s client_id);
otrng_client_s *get_otrng_client(const char *protocol, const char *accountname);
otrng_client_s *get_otrng_client_from_id(const otrng_client_id_s client_id);
otrng_client_s *purple_account_to_otrng_client(const PurpleAccount *account);
otrng_conversation_s *
purple_conversation_to_otrng_conversation(const PurpleConversation *conv);
otrng_client_id_s protocol_and_account_to_purple_conversation(FILE *privf);
otrng_plugin_conversation *
client_conversation_to_plugin_conversation(const otrng_s *conv);
/* Find the PurpleConversation appropriate to the given userinfo. If
* one doesn't yet exist, create it if force_create is true. */
PurpleConversation *otrng_plugin_userinfo_to_conv(const char *accountname,
const char *protocol,
const char *username,
int force_create);
#endif