aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/yahoo/yahoo2.h
diff options
context:
space:
mode:
authorIndent <please@skip.me>2015-02-19 02:47:20 -0300
committerdequis <dx@dxzone.com.ar>2015-02-20 19:50:54 -0300
commit5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11 (patch)
tree9fc0d50cb1f4bc9768d9f00de94eafd876bb55b0 /protocols/yahoo/yahoo2.h
parentaf359b4316f9d392c6b752495a1b2ed631576ed8 (diff)
Reindent everything to K&R style with tabs
Used uncrustify, with the configuration file in ./doc/uncrustify.cfg Commit author set to "Indent <please@skip.me>" so that it's easier to skip while doing git blame.
Diffstat (limited to 'protocols/yahoo/yahoo2.h')
-rw-r--r--protocols/yahoo/yahoo2.h178
1 files changed, 89 insertions, 89 deletions
diff --git a/protocols/yahoo/yahoo2.h b/protocols/yahoo/yahoo2.h
index 76180cd6..464672a1 100644
--- a/protocols/yahoo/yahoo2.h
+++ b/protocols/yahoo/yahoo2.h
@@ -29,34 +29,34 @@ extern "C" {
/* *** BitlBee: *** */
#include "bitlbee.h"
#undef free
-#define free( x ) g_free( x )
+#define free(x) g_free(x)
#undef malloc
-#define malloc( x ) g_malloc( x )
+#define malloc(x) g_malloc(x)
#undef calloc
-#define calloc( x, y ) g_calloc( x, y )
+#define calloc(x, y) g_calloc(x, y)
#undef realloc
-#define realloc( x, y ) g_realloc( x, y )
+#define realloc(x, y) g_realloc(x, y)
#undef strdup
-#define strdup( x ) g_strdup( x )
+#define strdup(x) g_strdup(x)
#undef strndup
-#define strndup( x,y ) g_strndup( x,y )
+#define strndup(x, y) g_strndup(x, y)
#undef snprintf
// #define snprintf( x... ) g_snprintf( x )
#undef strcasecmp
-#define strcasecmp( x,y ) g_strcasecmp( x,y )
+#define strcasecmp(x, y) g_strcasecmp(x, y)
#undef strncasecmp
-#define strncasecmp( x,y,z ) g_strncasecmp( x,y,z )
+#define strncasecmp(x, y, z) g_strncasecmp(x, y, z)
#include "yahoo2_types.h"
/* returns the socket descriptor object for a given pager connection. shouldn't be needed */
- void *yahoo_get_fd(int id);
+void *yahoo_get_fd(int id);
/* says how much logging to do */
/* see yahoo2_types.h for the different values */
- int yahoo_set_log_level(enum yahoo_log_level level);
- enum yahoo_log_level yahoo_get_log_level(void);
+int yahoo_set_log_level(enum yahoo_log_level level);
+enum yahoo_log_level yahoo_get_log_level(void);
/* these functions should be self explanatory */
/* who always means the buddy you're acting on */
@@ -66,14 +66,14 @@ extern "C" {
/* or 0 on failure */
/* you must call init before calling any other function */
/*
- * The optional parameters to init are key/value pairs that specify
+ * The optional parameters to init are key/value pairs that specify
* server settings to use. This list must be NULL terminated - even
* if the list is empty. If a parameter isn't set, a default value
* will be used. Parameter keys are strings, parameter values are
* either strings or ints, depending on the key. Values passed in
* are copied, so you can use const/auto/static/pointers/whatever
* you want. Parameters are:
- * NAME TYPE DEFAULT
+ * NAME TYPE DEFAULT
* pager_host char * scs.msg.yahoo.com
* pager_port int 5050
* filetransfer_host char * filetransfer.msg.yahoo.com
@@ -86,158 +86,158 @@ extern "C" {
*
* You should set at least local_host if you intend to use webcams
*/
- int yahoo_init_with_attributes(const char *username,
- const char *password, ...);
+int yahoo_init_with_attributes(const char *username,
+ const char *password, ...);
/* yahoo_init does the same as yahoo_init_with_attributes, assuming defaults
* for all attributes */
- int yahoo_init(const char *username, const char *password);
+int yahoo_init(const char *username, const char *password);
/* release all resources held by this session */
/* you need to call yahoo_close for a session only if
* yahoo_logoff is never called for it (ie, it was never logged in) */
- void yahoo_close(int id);
+void yahoo_close(int id);
/* login logs in to the server */
/* initial is of type enum yahoo_status. see yahoo2_types.h */
- void yahoo_login(int id, int initial);
- void yahoo_logoff(int id);
+void yahoo_login(int id, int initial);
+void yahoo_logoff(int id);
/* reloads status of all buddies */
- void yahoo_refresh(int id);
+void yahoo_refresh(int id);
/* activates/deactivates an identity */
- void yahoo_set_identity_status(int id, const char *identity,
- int active);
+void yahoo_set_identity_status(int id, const char *identity,
+ int active);
/* regets the entire buddy list from the server */
- void yahoo_get_list(int id);
+void yahoo_get_list(int id);
/* download buddy contact information from your yahoo addressbook */
- void yahoo_get_yab(int id);
+void yahoo_get_yab(int id);
/* add/modify an address book entry. if yab->dbid is set, it will */
/* modify that entry else it creates a new entry */
- void yahoo_set_yab(int id, struct yab *yab);
- void yahoo_keepalive(int id);
- void yahoo_chat_keepalive(int id);
+void yahoo_set_yab(int id, struct yab *yab);
+void yahoo_keepalive(int id);
+void yahoo_chat_keepalive(int id);
/* from is the identity you're sending from. if NULL, the default is used */
/* utf8 is whether msg is a utf8 string or not. */
- void yahoo_send_im(int id, const char *from, const char *who,
- const char *msg, int utf8, int picture);
+void yahoo_send_im(int id, const char *from, const char *who,
+ const char *msg, int utf8, int picture);
// void yahoo_send_buzz(int id, const char *from, const char *who);
/* if type is true, send typing notice, else send stopped typing notice */
- void yahoo_send_typing(int id, const char *from, const char *who,
- int typ);
+void yahoo_send_typing(int id, const char *from, const char *who,
+ int typ);
/* used to set away/back status. */
/* away says whether the custom message is an away message or a sig */
- void yahoo_set_away(int id, enum yahoo_status state, const char *msg,
- int away);
-
- void yahoo_add_buddy(int id, const char *who, const char *group,
- const char *msg);
- void yahoo_remove_buddy(int id, const char *who, const char *group);
- void yahoo_confirm_buddy(int id, const char *who, int reject,
- const char *msg);
- void yahoo_stealth_buddy(int id, const char *who, int unstealth);
+void yahoo_set_away(int id, enum yahoo_status state, const char *msg,
+ int away);
+
+void yahoo_add_buddy(int id, const char *who, const char *group,
+ const char *msg);
+void yahoo_remove_buddy(int id, const char *who, const char *group);
+void yahoo_confirm_buddy(int id, const char *who, int reject,
+ const char *msg);
+void yahoo_stealth_buddy(int id, const char *who, int unstealth);
/* if unignore is true, unignore, else ignore */
- void yahoo_ignore_buddy(int id, const char *who, int unignore);
- void yahoo_change_buddy_group(int id, const char *who,
- const char *old_group, const char *new_group);
- void yahoo_group_rename(int id, const char *old_group,
- const char *new_group);
-
- void yahoo_conference_invite(int id, const char *from, YList *who,
- const char *room, const char *msg);
- void yahoo_conference_addinvite(int id, const char *from,
- const char *who, const char *room, const YList *members,
- const char *msg);
- void yahoo_conference_decline(int id, const char *from, YList *who,
- const char *room, const char *msg);
- void yahoo_conference_message(int id, const char *from, YList *who,
- const char *room, const char *msg, int utf8);
- void yahoo_conference_logon(int id, const char *from, YList *who,
- const char *room);
- void yahoo_conference_logoff(int id, const char *from, YList *who,
- const char *room);
+void yahoo_ignore_buddy(int id, const char *who, int unignore);
+void yahoo_change_buddy_group(int id, const char *who,
+ const char *old_group, const char *new_group);
+void yahoo_group_rename(int id, const char *old_group,
+ const char *new_group);
+
+void yahoo_conference_invite(int id, const char *from, YList *who,
+ const char *room, const char *msg);
+void yahoo_conference_addinvite(int id, const char *from,
+ const char *who, const char *room, const YList *members,
+ const char *msg);
+void yahoo_conference_decline(int id, const char *from, YList *who,
+ const char *room, const char *msg);
+void yahoo_conference_message(int id, const char *from, YList *who,
+ const char *room, const char *msg, int utf8);
+void yahoo_conference_logon(int id, const char *from, YList *who,
+ const char *room);
+void yahoo_conference_logoff(int id, const char *from, YList *who,
+ const char *room);
/* Get a list of chatrooms */
- void yahoo_get_chatrooms(int id, int chatroomid);
+void yahoo_get_chatrooms(int id, int chatroomid);
/* join room with specified roomname and roomid */
- void yahoo_chat_logon(int id, const char *from, const char *room,
- const char *roomid);
+void yahoo_chat_logon(int id, const char *from, const char *room,
+ const char *roomid);
/* Send message "msg" to room with specified roomname, msgtype is 1-normal message or 2-/me mesage */
- void yahoo_chat_message(int id, const char *from, const char *room,
- const char *msg, const int msgtype, const int utf8);
+void yahoo_chat_message(int id, const char *from, const char *room,
+ const char *msg, const int msgtype, const int utf8);
/* Log off chat */
- void yahoo_chat_logoff(int id, const char *from);
+void yahoo_chat_logoff(int id, const char *from);
/* requests a webcam feed */
/* who is the person who's webcam you would like to view */
/* if who is null, then you're the broadcaster */
- void yahoo_webcam_get_feed(int id, const char *who);
- void yahoo_webcam_close_feed(int id, const char *who);
+void yahoo_webcam_get_feed(int id, const char *who);
+void yahoo_webcam_close_feed(int id, const char *who);
/* sends an image when uploading */
/* image points to a JPEG-2000 image, length is the length of the image */
/* in bytes. The timestamp is the time in milliseconds since we started the */
/* webcam. */
- void yahoo_webcam_send_image(int id, unsigned char *image,
- unsigned int length, unsigned int timestamp);
+void yahoo_webcam_send_image(int id, unsigned char *image,
+ unsigned int length, unsigned int timestamp);
/* this function should be called if we want to allow a user to watch the */
/* webcam. Who is the user we want to accept. */
/* Accept user (accept = 1), decline user (accept = 0) */
- void yahoo_webcam_accept_viewer(int id, const char *who, int accept);
+void yahoo_webcam_accept_viewer(int id, const char *who, int accept);
/* send an invitation to a user to view your webcam */
- void yahoo_webcam_invite(int id, const char *who);
+void yahoo_webcam_invite(int id, const char *who);
/* will set up a connection and initiate file transfer.
* callback will be called with the fd that you should write
* the file data to
*/
- void yahoo_send_file(int id, const char *who, const char *msg,
- const char *name, unsigned long size,
- yahoo_get_fd_callback callback, void *data);
+void yahoo_send_file(int id, const char *who, const char *msg,
+ const char *name, unsigned long size,
+ yahoo_get_fd_callback callback, void *data);
/*
* Respond to a file transfer request. Be sure to provide the callback data
* since that is your only chance to recognize future callbacks
*/
- void yahoo_send_file_transfer_response(int client_id, int response,
- char *id, void *data);
+void yahoo_send_file_transfer_response(int client_id, int response,
+ char *id, void *data);
/* send a search request
*/
- void yahoo_search(int id, enum yahoo_search_type t, const char *text,
- enum yahoo_search_gender g, enum yahoo_search_agerange ar,
- int photo, int yahoo_only);
+void yahoo_search(int id, enum yahoo_search_type t, const char *text,
+ enum yahoo_search_gender g, enum yahoo_search_agerange ar,
+ int photo, int yahoo_only);
/* continue last search
* should be called if only (start+found >= total)
*
* where the above three are passed to ext_yahoo_got_search_result
*/
- void yahoo_search_again(int id, int start);
+void yahoo_search_again(int id, int start);
/* these should be called when input is available on a fd */
/* registered by ext_yahoo_add_handler */
/* if these return negative values, errno may be set */
- int yahoo_read_ready(int id, void *fd, void *data);
- int yahoo_write_ready(int id, void *fd, void *data);
+int yahoo_read_ready(int id, void *fd, void *data);
+int yahoo_write_ready(int id, void *fd, void *data);
/* utility functions. these do not hit the server */
- enum yahoo_status yahoo_current_status(int id);
- const YList *yahoo_get_buddylist(int id);
- const YList *yahoo_get_ignorelist(int id);
- const YList *yahoo_get_identities(int id);
+enum yahoo_status yahoo_current_status(int id);
+const YList *yahoo_get_buddylist(int id);
+const YList *yahoo_get_ignorelist(int id);
+const YList *yahoo_get_identities(int id);
/* 'which' could be y, t, c or login. This may change in later versions. */
- const char *yahoo_get_cookie(int id, const char *which);
+const char *yahoo_get_cookie(int id, const char *which);
/* returns the url used to get user profiles - you must append the user id */
/* as of now this is http://profiles.yahoo.com/ */
/* You'll have to do urlencoding yourself, but see yahoo_httplib.h first */
- const char *yahoo_get_profile_url(void);
+const char *yahoo_get_profile_url(void);
- void yahoo_buddyicon_request(int id, const char *who);
+void yahoo_buddyicon_request(int id, const char *who);
#include "yahoo_httplib.h"