~ubuntu-branches/ubuntu/vivid/pidgin-otr/vivid-proposed

« back to all changes in this revision

Viewing changes to dialogs.h

  • Committer: Package Import Robot
  • Author(s): Thibaut VARENE
  • Date: 2012-09-29 12:27:32 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20120929122732-vbydcayuggqp8k8b
Tags: 4.0.0-1
New upstream release (Closes: #538644, #549931, #561865)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *  Off-the-Record Messaging plugin for pidgin
3
 
 *  Copyright (C) 2004-2008  Ian Goldberg, Rob Smits,
4
 
 *                           Chris Alexander, Nikita Borisov
 
3
 *  Copyright (C) 2004-2012  Ian Goldberg, Rob Smits,
 
4
 *                           Chris Alexander, Willy Lew,
 
5
 *                           Nikita Borisov
5
6
 *                           <otr@cypherpunks.ca>
6
7
 *
7
8
 *  This program is free software; you can redistribute it and/or modify
15
16
 *
16
17
 *  You should have received a copy of the GNU General Public License
17
18
 *  along with this program; if not, write to the Free Software
18
 
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
19
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
20
 */
20
21
 
21
22
#ifndef __OTRG_DIALOGS_H__
34
35
#define SESSIONID_HELPURL     BASE_HELPURL "sessionid.php"
35
36
#define UNVERIFIED_HELPURL    BASE_HELPURL "unverified.php"
36
37
#define LEVELS_HELPURL        BASE_HELPURL "levels.php"
 
38
#define SESSIONS_HELPURL      BASE_HELPURL "sessions.php"
 
39
 
37
40
 
38
41
typedef struct s_OtrgDialogWait *OtrgDialogWaitHandle;
39
42
 
47
50
        const char *title, const char *primary, const char *secondary);
48
51
 
49
52
    int (*display_otr_message)(const char *accountname, const char *protocol,
50
 
            const char *username, const char *msg);
 
53
            const char *username, const char *msg, int force_create);
51
54
 
52
55
    OtrgDialogWaitHandle (*private_key_wait_start)(const char *account,
53
56
        const char *protocol);
62
65
    void (*socialist_millionaires)(ConnContext *context, char *question,
63
66
            gboolean responder);
64
67
 
65
 
    void (*update_smp)(ConnContext *context, double progress_level);
 
68
    void (*update_smp)(ConnContext *context, OtrlSMPEvent smp_event,
 
69
            double progress_level);
66
70
 
67
71
    void (*connected)(ConnContext *context);
68
72
 
117
121
/* Display an OTR control message for the given accountname / protocol /
118
122
 * username conversation.  Return 0 on success, non-0 on error (in which
119
123
 * case the message will be displayed inline as a received message). */
120
 
int otrg_dialog_display_otr_message( const char *accountname,
121
 
        const char *protocol, const char *username, const char *msg);
 
124
int otrg_dialog_display_otr_message(const char *accountname,
 
125
        const char *protocol, const char *username, const char *msg,
 
126
        int force_create);
122
127
 
123
128
/* Put up a Please Wait dialog. This dialog can not be cancelled.
124
129
 * Return a handle that must eventually be passed to
146
151
        char *question);
147
152
 
148
153
/* Update the status of an ongoing socialist millionaires protocol. */
149
 
void otrg_dialog_update_smp(ConnContext *context, double progress_level);
 
154
void otrg_dialog_update_smp(ConnContext *context, OtrlSMPEvent smp_event,
 
155
        double progress_level);
150
156
 
151
157
/* Call this when a context transitions to ENCRYPTED. */
152
158
void otrg_dialog_connected(ConnContext *context);