PageRenderTime 70ms CodeModel.GetById 59ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 0ms

/cl.h

https://code.google.com/
C++ Header | 155 lines | 131 code | 24 blank | 0 comment | 0 complexity | ec62405b6eff82b746699dd91be0e7ba MD5 | raw file
  1#ifndef MRIM_CL_H
  2#define MRIM_CL_H
  3
  4#include "mrim.h"
  5#include "package.h"
  6#include "statuses.h"
  7
  8typedef struct {
  9	guint32 id;
 10	guint32 flags;
 11	gchar *name;
 12	PurpleGroup *group;
 13} MrimGroup;
 14
 15typedef struct {
 16	MrimData *mrim;
 17	PurpleBuddy *buddy;
 18	guint32 id;
 19	gchar *email;
 20	gchar *alias;
 21	guint32 flags;
 22	guint32 group_id;
 23	guint32 s_flags;
 24	gboolean authorized;
 25	MrimStatus *status;
 26	gchar *user_agent;
 27	gchar *microblog;
 28	gchar **phones;
 29	gchar *listening;
 30	guint32 com_support;
 31} MrimBuddy;
 32
 33typedef struct {
 34	PurpleBuddy *buddy;
 35	PurpleGroup *group;
 36	gboolean move;
 37} AddContactInfo;
 38
 39typedef struct {
 40	PurpleBuddy *buddy;
 41} BuddyAddInfo;
 42
 43typedef struct {
 44	MrimData *mrim;
 45	gchar *from;
 46	guint32 seq;
 47} MrimAuthData;
 48
 49typedef struct {
 50	gchar *title;
 51	gboolean unicode;
 52	gboolean skip;
 53} MrimSearchResultColumn;
 54
 55typedef struct {
 56	guint column_count;
 57	MrimSearchResultColumn *columns;
 58	guint row_count;
 59	gchar ***rows;
 60	guint username_index;
 61	guint domain_index;
 62} MrimSearchResult;
 63
 64#ifdef ENABLE_GTK
 65
 66typedef struct {
 67	PurpleBuddy *buddy;
 68	MrimData *mrim;
 69	MrimBuddy *mb;
 70	GtkDialog *dialog;
 71	GtkTextView *message_text;
 72	GtkCheckButton *translit;
 73	GtkLabel *char_counter;
 74	GtkComboBox *phone;
 75	gchar *sms_text;
 76} SmsDialogParams;
 77
 78#endif
 79
 80static const gchar *zodiac[] = {
 81	N_("Aries"),
 82	N_("Taurus"),
 83	N_("Gemini"),
 84	N_("Cancer"),
 85	N_("Leo"),
 86	N_("Virgo"),
 87	N_("Libra"),
 88	N_("Scorpius"),
 89	N_("Sagittarius"),
 90	N_("Capricornus"),
 91	N_("Aquarius"),
 92	N_("Pisces")
 93};
 94
 95static const gchar *user_info_fields[] = { //For translation
 96	N_("Nickname"),
 97	N_("FirstName"),
 98	N_("LastName"),
 99	N_("Sex"),
100	N_("Birthday"),
101	N_("Location"),
102	N_("Zodiac"),
103	N_("Phone"),
104	N_("status_uri"),
105	N_("status_title"),
106	N_("status_desc"),
107	N_("ua_features"),
108	N_("Age")
109};
110
111void mrim_cl_load(MrimPackage *pack, MrimData *mrim);
112void free_mrim_buddy(MrimBuddy *mb);
113
114void mrim_rename_group(PurpleConnection *gc, const char *old_name, PurpleGroup *group, GList *moved_buddies);
115void mrim_remove_group(PurpleConnection *gc, PurpleGroup *group);
116MrimGroup *new_mrim_group(MrimData *mrim, guint32 id, gchar *name, guint32 flags);
117void free_mrim_group(MrimGroup *group);
118MrimGroup *get_mrim_group(MrimData *mrim, guint32 id);
119MrimGroup *get_mrim_group_by_name(MrimData *mrim, gchar *name);
120
121void mrim_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group);
122void mrim_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group);
123void mrim_free_buddy(PurpleBuddy *buddy);
124void mrim_alias_buddy(PurpleConnection *gc, const char *who, const char *alias);
125void mrim_move_buddy(PurpleConnection *gc, const char *who, const char *old_group, const char *new_group);
126
127const char *mrim_normalize(const PurpleAccount *account, const char *who);
128
129GList *mrim_user_actions(PurpleBlistNode *node);
130void mrim_get_info(PurpleConnection *gc, const char *username);
131void mrim_tooltip_text(PurpleBuddy *buddy, PurpleNotifyUserInfo *info, gboolean full);
132
133void mrim_search_ack(MrimData *mrim, gpointer user_data, MrimPackage *pack);
134
135void blist_authorize_menu_item(PurpleBlistNode *node, gpointer userdata);
136void blist_edit_phones_menu_item(PurpleBlistNode *node, gpointer userdata);
137void blist_gtk_sms_menu_item(PurpleBlistNode *node, gpointer userdata);
138void  blist_sms_menu_item(PurpleBlistNode *node, gpointer userdata);
139void mrim_url_menu_action(PurpleBlistNode *node, gpointer userdata);
140
141void mrim_authorization_yes(gpointer va_data);
142void mrim_authorization_no(gpointer va_data);
143void mrim_send_authorize(MrimData *mrim, gchar *email, gchar *message);
144
145
146void mrim_chat_join(PurpleConnection *gc, GHashTable *components);
147void mrim_reject_chat(PurpleConnection *gc, GHashTable *components);
148char *mrim_get_chat_name(GHashTable *components);
149void mrim_chat_invite(PurpleConnection *gc, int id, const char *message, const char *who);
150void mrim_chat_leave(PurpleConnection *gc, int id);
151PurpleRoomlist *mrim_roomlist_get_list(PurpleConnection *gc);
152void mrim_roomlist_cancel(PurpleRoomlist *list);
153void mrim_roomlist_expand_category(PurpleRoomlist *list,	PurpleRoomlistRoom *category);
154
155#endif