libpurple/protocols/myspace/myspace.h

branch
soc.2007.msimprpl
changeset 18038
4a904c0a564e
parent 18037
038a99b09d35
child 18039
dba5801e5fb8
equal deleted inserted replaced
18037:038a99b09d35 18038:4a904c0a564e
144 #define MSIM_TEXT_UNDERLINE 4 144 #define MSIM_TEXT_UNDERLINE 4
145 145
146 /* Random number in every MsimSession, to ensure it is valid. */ 146 /* Random number in every MsimSession, to ensure it is valid. */
147 #define MSIM_SESSION_STRUCT_MAGIC 0xe4a6752b 147 #define MSIM_SESSION_STRUCT_MAGIC 0xe4a6752b
148 148
149 /* Inbox status bitfield values for MsimSession.inbox_status */
150 #define MSIM_INBOX_MAIL (1 << 0)
151 #define MSIM_INBOX_BLOG_COMMENT (1 << 1)
152 #define MSIM_INBOX_PROFILE_COMMENT (1 << 2)
153 #define MSIM_INBOX_FRIEND_REQUEST (1 << 3)
154 #define MSIM_INBOX_PICTURE_COMMENT (1 << 4)
155
149 /* Everything needed to keep track of a session. */ 156 /* Everything needed to keep track of a session. */
150 typedef struct _MsimSession 157 typedef struct _MsimSession
151 { 158 {
152 guint magic; /**< MSIM_SESSION_STRUCT_MAGIC */ 159 guint magic; /**< MSIM_SESSION_STRUCT_MAGIC */
153 PurpleAccount *account; 160 PurpleAccount *account;
163 170
164 gchar *rxbuf; /**< Receive buffer */ 171 gchar *rxbuf; /**< Receive buffer */
165 guint rxoff; /**< Receive buffer offset */ 172 guint rxoff; /**< Receive buffer offset */
166 guint next_rid; /**< Next request/response ID */ 173 guint next_rid; /**< Next request/response ID */
167 time_t last_comm; /**< Time received last communication */ 174 time_t last_comm; /**< Time received last communication */
175 guint inbox_status; /**< Bit field of inbox notifications */
168 } MsimSession; 176 } MsimSession;
169 177
170 /* Check if an MsimSession is valid */ 178 /* Check if an MsimSession is valid */
171 #define MSIM_SESSION_VALID(s) (session != NULL && \ 179 #define MSIM_SESSION_VALID(s) (session != NULL && \
172 session->magic == MSIM_SESSION_STRUCT_MAGIC) 180 session->magic == MSIM_SESSION_STRUCT_MAGIC)
252 void msim_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group); 260 void msim_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group);
253 void msim_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group); 261 void msim_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group);
254 262
255 gboolean msim_offline_message(const PurpleBuddy *buddy); 263 gboolean msim_offline_message(const PurpleBuddy *buddy);
256 264
257 void msim_check_mail_cb(MsimSession *session, MsimMessage *userinfo, gpointer data); 265 void msim_check_inbox_cb(MsimSession *session, MsimMessage *userinfo, gpointer data);
258 gboolean msim_check_mail(gpointer data); 266 gboolean msim_check_inbox(gpointer data);
259 267
260 void msim_input_cb(gpointer gc_uncasted, gint source, 268 void msim_input_cb(gpointer gc_uncasted, gint source,
261 PurpleInputCondition cond); 269 PurpleInputCondition cond);
262 270
263 guint msim_new_reply_callback(MsimSession *session, MSIM_USER_LOOKUP_CB cb, gpointer data); 271 guint msim_new_reply_callback(MsimSession *session, MSIM_USER_LOOKUP_CB cb, gpointer data);

mercurial