~ubuntu-branches/ubuntu/natty/pidgin-otr/natty-updates

« back to all changes in this revision

Viewing changes to ui.h

  • Committer: Bazaar Package Importer
  • Author(s): Thibaut VARENE
  • Date: 2007-05-08 17:21:54 UTC
  • Revision ID: james.westby@ubuntu.com-20070508172154-rl73hykhkfbbvhzm
Tags: upstream-3.0.0+cvs20070508
ImportĀ upstreamĀ versionĀ 3.0.0+cvs20070508

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  Off-the-Record Messaging plugin for pidgin
 
3
 *  Copyright (C) 2004-2005  Nikita Borisov and Ian Goldberg
 
4
 *                           <otr@cypherpunks.ca>
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of version 2 of the GNU General Public License as
 
8
 *  published by the Free Software Foundation.
 
9
 *
 
10
 *  This program is distributed in the hope that it will be useful,
 
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 *  GNU General Public License for more details.
 
14
 *
 
15
 *  You should have received a copy of the GNU General Public License
 
16
 *  along with this program; if not, write to the Free Software
 
17
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
18
 */
 
19
 
 
20
#ifndef __OTRG_UI_H__
 
21
#define __OTRG_UI_H__
 
22
 
 
23
#include <libotr/context.h>
 
24
 
 
25
typedef struct {
 
26
    void (*update_fingerprint)(void);
 
27
 
 
28
    void (*update_keylist)(void);
 
29
 
 
30
    void (*config_buddy)(PurpleBuddy *buddy);
 
31
 
 
32
    OtrlPolicy (*find_policy)(PurpleAccount *account, const char *name);
 
33
} OtrgUiUiOps;
 
34
 
 
35
/* Set the UI ops */
 
36
void otrg_ui_set_ui_ops(const OtrgUiUiOps *ops);
 
37
 
 
38
/* Get the UI ops */
 
39
const OtrgUiUiOps *otrg_ui_get_ui_ops(void);
 
40
 
 
41
/* Call this function when the DSA key is updated; it will redraw the
 
42
 * UI. */
 
43
void otrg_ui_update_fingerprint(void);
 
44
 
 
45
/* Update the keylist, if it's visible */
 
46
void otrg_ui_update_keylist(void);
 
47
 
 
48
/* Send an OTR Query Message to attempt to start a connection */
 
49
void otrg_ui_connect_connection(ConnContext *context);
 
50
 
 
51
/* Drop a context to PLAINTEXT state */
 
52
void otrg_ui_disconnect_connection(ConnContext *context);
 
53
 
 
54
/* Forget a fingerprint */
 
55
void otrg_ui_forget_fingerprint(Fingerprint *fingerprint);
 
56
 
 
57
/* Configure OTR for a particular buddy */
 
58
void otrg_ui_config_buddy(PurpleBuddy *buddy);
 
59
 
 
60
/* Calculate the policy for a particular account / username */
 
61
OtrlPolicy otrg_ui_find_policy(PurpleAccount *account, const char *name);
 
62
 
 
63
#endif