File: state.h

package info (click to toggle)
pidgin-encryption 3.1-1
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 2,916 kB
  • ctags: 961
  • sloc: sh: 10,460; ansic: 8,821; makefile: 376; yacc: 318
file content (36 lines) | stat: -rw-r--r-- 1,062 bytes parent folder | download | duplicates (3)
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
#ifndef PE_STATE_H
#define PE_STATE_H

#include <gdk/gdk.h>

typedef struct EncryptionState {
   gboolean incoming_encrypted;
   gboolean outgoing_encrypted;
   gboolean has_been_notified;
   gboolean is_capable;
} EncryptionState;

void PE_state_init();
void PE_state_delete();


EncryptionState* PE_get_state(PurpleConversation* conv);
void PE_reset_state(PurpleConversation *conv);
void PE_free_state(PurpleConversation *conv);

void     PE_set_tx_encryption(PurpleConversation* conv, gboolean new_state);
gboolean PE_get_tx_encryption(PurpleConversation *conv);

void     PE_set_capable(PurpleConversation *conv, gboolean cap);

gboolean PE_has_been_notified(PurpleConversation *conv);
void     PE_set_notified(PurpleConversation *conv, gboolean newstate);

void     PE_set_rx_encryption(PurpleConversation *conv, gboolean encrypted);

gboolean  PE_get_default_notified(const PurpleAccount *account, const gchar* name);

/* Ensure that the conversation's state is reflected in the conversation's menu */
void PE_sync_state(PurpleConversation *conv);

#endif