Changeset f6f5eee
- Timestamp:
- 2010-07-27T22:04:19Z (14 years ago)
- Branches:
- master
- Children:
- 4255320
- Parents:
- 82ca986
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/user-guide/misc.xml
r82ca986 rf6f5eee 218 218 219 219 <para> 220 Two modifiers are scurrently available: You can include only the first few220 Two modifiers are currently available: You can include only the first few 221 221 characters of a variable by putting a number right after the %. For 222 222 example, <emphasis>[%3group]%-@nick</emphasis> will include only the first -
irc.h
r82ca986 rf6f5eee 45 45 { 46 46 USTATUS_OFFLINE = 0, 47 USTATUS_AUTHORIZED = 1, 48 USTATUS_LOGGED_IN = 2, 49 USTATUS_IDENTIFIED = 4, 50 USTATUS_SHUTDOWN = 8 47 USTATUS_AUTHORIZED = 1, /* Gave the correct server password (PASS). */ 48 USTATUS_LOGGED_IN = 2, /* USER+NICK(+PASS) finished. */ 49 USTATUS_IDENTIFIED = 4, /* To NickServ (root). */ 50 USTATUS_SHUTDOWN = 8, /* Now used to indicate we're shutting down. 51 Currently just blocks irc_vawrite(). */ 51 52 } irc_status_t; 52 53 -
protocols/bee.h
r82ca986 rf6f5eee 32 32 typedef struct bee 33 33 { 34 /* Settings. See set.h for how these work. The UI can add its 35 own settings here. */ 34 36 struct set *set; 35 37 36 GSList *users; 37 GSList *groups; 38 GSList *users; /* struct bee_user */ 39 GSList *groups; /* struct bee_group */ 38 40 struct account *accounts; /* TODO(wilmer): Use GSList here too? */ 39 41 40 42 /* Symbolic, to refer to the local user (who has no real bee_user 41 43 object). Not to be used by anything except so far imcb_chat_add/ 42 remove_buddy(). This seems slightly cleaner than abusing NULL.*/44 remove_buddy(). */ 43 45 struct bee_user *user; 44 46 47 /* Fill in the callbacks for events you care about. */ 45 48 const struct bee_ui_funcs *ui; 49 50 /* And this one will be passed to every callback for any state the 51 UI may want to keep. */ 46 52 void *ui_data; 47 53 } bee_t; … … 66 72 67 73 bee_user_flags_t flags; 68 char *status; 69 char *status_msg; 74 char *status; /* NULL means available, anything else is an away state. */ 75 char *status_msg; /* Status and/or away message. */ 70 76 77 /* Set using imcb_buddy_times(). */ 71 78 time_t login_time, idle_time; 72 79 … … 75 82 } bee_user_t; 76 83 84 /* This one's mostly used so save space and make it easier (cheaper) to 85 compare groups of contacts, etc. */ 77 86 typedef struct bee_group 78 87 { 79 char *key; 88 char *key; /* Lower case version of the name. */ 80 89 char *name; 81 90 } bee_group_t; … … 88 97 gboolean (*user_new)( bee_t *bee, struct bee_user *bu ); 89 98 gboolean (*user_free)( bee_t *bee, struct bee_user *bu ); 99 /* Set the fullname first, then call this one to notify the UI. */ 90 100 gboolean (*user_fullname)( bee_t *bee, bee_user_t *bu ); 91 101 gboolean (*user_nick_hint)( bee_t *bee, bee_user_t *bu, const char *hint ); 102 /* Notify the UI when an existing user is moved between groups. */ 92 103 gboolean (*user_group)( bee_t *bee, bee_user_t *bu ); 104 /* State info is already updated, old is provided in case the UI needs a diff. */ 93 105 gboolean (*user_status)( bee_t *bee, struct bee_user *bu, struct bee_user *old ); 106 /* On every incoming message. sent_at = 0 means unknown. */ 94 107 gboolean (*user_msg)( bee_t *bee, bee_user_t *bu, const char *msg, time_t sent_at ); 108 /* Flags currently defined (OPT_TYPING/THINKING) in nogaim.h. */ 95 109 gboolean (*user_typing)( bee_t *bee, bee_user_t *bu, guint32 flags ); 96 110 111 /* Called at creation time. Don't show to the user until s/he is 112 added using chat_add_user(). UI state can be stored via c->data. */ 97 113 gboolean (*chat_new)( bee_t *bee, struct groupchat *c ); 98 114 gboolean (*chat_free)( bee_t *bee, struct groupchat *c ); 115 /* System messages of any kind. */ 99 116 gboolean (*chat_log)( bee_t *bee, struct groupchat *c, const char *text ); 100 117 gboolean (*chat_msg)( bee_t *bee, struct groupchat *c, bee_user_t *bu, const char *msg, time_t sent_at ); … … 135 152 136 153 /* bee_chat.c */ 137 #if 0 138 struct groupchat *imcb_chat_new( struct im_connection *ic, const char *handle ); 139 void imcb_chat_name_hint( struct groupchat *c, const char *name ); 140 void imcb_chat_free( struct groupchat *c ); 141 void imcb_chat_msg( struct groupchat *c, const char *who, char *msg, uint32_t flags, time_t sent_at ); 142 void imcb_chat_log( struct groupchat *c, char *format, ... ); 143 void imcb_chat_topic( struct groupchat *c, char *who, char *topic, time_t set_at ); 144 void imcb_chat_add_buddy( struct groupchat *b, const char *handle ); 145 void imcb_chat_remove_buddy( struct groupchat *b, const char *handle, const char *reason ); 146 static int remove_chat_buddy_silent( struct groupchat *b, const char *handle ); 147 #endif 148 int bee_chat_msg( bee_t *bee, struct groupchat *c, const char *msg, int flags ); 149 struct groupchat *bee_chat_by_title( bee_t *bee, struct im_connection *ic, const char *title ); 154 /* These two functions are to create a group chat. 155 * - imcb_chat_new(): the 'handle' parameter identifies the chat, like the 156 * channel name on IRC. 157 * - After you have a groupchat pointer, you should add the handles, finally 158 * the user her/himself. At that point the group chat will be visible to the 159 * user, too. */ 160 G_MODULE_EXPORT struct groupchat *imcb_chat_new( struct im_connection *ic, const char *handle ); 161 G_MODULE_EXPORT void imcb_chat_name_hint( struct groupchat *c, const char *name ); 162 G_MODULE_EXPORT void imcb_chat_free( struct groupchat *c ); 163 /* To tell BitlBee 'who' said 'msg' in 'c'. 'flags' and 'sent_at' can be 0. */ 164 G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, const char *who, char *msg, guint32 flags, time_t sent_at ); 165 /* System messages specific to a groupchat, so they can be displayed in the right context. */ 166 G_MODULE_EXPORT void imcb_chat_log( struct groupchat *c, char *format, ... ); 167 /* To tell BitlBee 'who' changed the topic of 'c' to 'topic'. */ 168 G_MODULE_EXPORT void imcb_chat_topic( struct groupchat *c, char *who, char *topic, time_t set_at ); 169 G_MODULE_EXPORT void imcb_chat_add_buddy( struct groupchat *c, const char *handle ); 170 /* To remove a handle from a group chat. Reason can be NULL. */ 171 G_MODULE_EXPORT void imcb_chat_remove_buddy( struct groupchat *c, const char *handle, const char *reason ); 172 G_MODULE_EXPORT int bee_chat_msg( bee_t *bee, struct groupchat *c, const char *msg, int flags ); 173 G_MODULE_EXPORT struct groupchat *bee_chat_by_title( bee_t *bee, struct im_connection *ic, const char *title ); 150 174 151 175 #endif /* __BEE_H__ */ -
protocols/nogaim.c
r82ca986 rf6f5eee 289 289 if( ic->bee->ui->imc_connected ) 290 290 ic->bee->ui->imc_connected( ic ); 291 292 /*293 for( c = irc->chatrooms; c; c = c->next )294 {295 if( c->acc != ic->acc )296 continue;297 298 if( set_getbool( &c->set, "auto_join" ) )299 chat_join( irc, c, NULL );300 }301 */302 291 } 303 292 -
protocols/nogaim.h
r82ca986 rf6f5eee 305 305 G_MODULE_EXPORT void imcb_clean_handle( struct im_connection *ic, char *handle ); 306 306 307 /* Groupchats */308 G_MODULE_EXPORT void imcb_chat_invited( struct im_connection *ic, char *handle, char *who, char *msg, GList *data );309 /* These two functions are to create a group chat.310 * - imcb_chat_new(): the 'handle' parameter identifies the chat, like the311 * channel name on IRC.312 * - After you have a groupchat pointer, you should add the handles, finally313 * the user her/himself. At that point the group chat will be visible to the314 * user, too. */315 G_MODULE_EXPORT struct groupchat *imcb_chat_new( struct im_connection *ic, const char *handle );316 G_MODULE_EXPORT void imcb_chat_name_hint( struct groupchat *c, const char *name );317 G_MODULE_EXPORT void imcb_chat_add_buddy( struct groupchat *b, const char *handle );318 /* To remove a handle from a group chat. Reason can be NULL. */319 G_MODULE_EXPORT void imcb_chat_remove_buddy( struct groupchat *b, const char *handle, const char *reason );320 /* To tell BitlBee 'who' said 'msg' in 'c'. 'flags' and 'sent_at' can be 0. */321 G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, const char *who, char *msg, uint32_t flags, time_t sent_at );322 /* System messages specific to a groupchat, so they can be displayed in the right context. */323 G_MODULE_EXPORT void imcb_chat_log( struct groupchat *c, char *format, ... ) G_GNUC_PRINTF( 2, 3 );324 /* To tell BitlBee 'who' changed the topic of 'c' to 'topic'. */325 G_MODULE_EXPORT void imcb_chat_topic( struct groupchat *c, char *who, char *topic, time_t set_at );326 G_MODULE_EXPORT void imcb_chat_free( struct groupchat *c );327 328 307 /* Actions, or whatever. */ 329 308 int imc_away_send_update( struct im_connection *ic ); -
set.h
r82ca986 rf6f5eee 37 37 from setting invalid values, you can write an evaluator function for 38 38 every setting, which can check a new value and block it by returning 39 NULL, or replace it by returning a new value. See struct set.eval. 40 One thing that is really missing here is additional data for the 41 evaluator. This could be useful to add minimum and maximum values for 42 integers, for example. */ 39 NULL, or replace it by returning a new value. See struct set.eval. */ 43 40 44 41 typedef char *(*set_eval) ( struct set *set, char *value ); … … 66 63 this (yet?). */ 67 64 68 /* Eval: Returns SET_INVALID if the value is incorrect orexactly69 the passed value variable . When returning a corrected value,70 set_setstr() should be able tofree() the returned string! */65 /* Eval: Returns SET_INVALID if the value is incorrect, exactly 66 the passed value variable, or a corrected value. In case of 67 the latter, set_setstr() will free() the returned string! */ 71 68 set_eval eval; 72 69 void *eval_data;
Note: See TracChangeset
for help on using the changeset viewer.