source: protocols/yahoo/yahoo2_callbacks.h @ c36f73b

Last change on this file since c36f73b was c36f73b, checked in by Wilmer van der Gaast <wilmer@…>, at 2010-07-23T14:35:45Z

This should mostly be a no-op, merging *loads* of whitespace changes from
libyahoo2 so that I can see better what really changed.

  • Property mode set to 100644
File size: 22.2 KB
Line 
1/*
2 * libyahoo2: yahoo2_callbacks.h
3 *
4 * Copyright (C) 2002-2004, Philip S Tellis <philip.tellis AT gmx.net>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 *
20 */
21
22/*
23 * The functions in this file *must* be defined in your client program
24 * If you want to use a callback structure instead of direct functions,
25 * then you must define USE_STRUCT_CALLBACKS in all files that #include
26 * this one.
27 *
28 * Register the callback structure by calling yahoo_register_callbacks -
29 * declared in this file and defined in libyahoo2.c
30 */
31
32#ifndef YAHOO2_CALLBACKS_H
33#define YAHOO2_CALLBACKS_H
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39#include "yahoo2_types.h"
40
41/*
42 * yahoo2_callbacks.h
43 *
44 * Callback interface for libyahoo2
45 */
46
47        typedef enum {
48                YAHOO_INPUT_READ = 1 << 0,
49                YAHOO_INPUT_WRITE = 1 << 1,
50                YAHOO_INPUT_EXCEPTION = 1 << 2
51        } yahoo_input_condition;
52
53/*
54 * A callback function called when an asynchronous connect completes.
55 *
56 * Params:
57 *     fd    - The file descriptor that has been connected, or -1 on error
58 *     error - The value of errno set by the call to connect or 0 if no error
59 *             Set both fd and error to 0 if the connect was cancelled by the
60 *             user
61 *     callback_data - the callback_data passed to the ext_yahoo_connect_async
62 *             function
63 */
64typedef void (*yahoo_connect_callback)(int fd, int error, void *callback_data);
65
66
67/*
68 * The following functions need to be implemented in the client
69 * interface.  They will be called by the library when each
70 * event occurs.
71 */
72
73/*
74 * should we use a callback structure or directly call functions
75 * if you want the structure, you *must* define USE_STRUCT_CALLBACKS
76 * both when you compile the library, and when you compile your code
77 * that uses the library
78 */
79
80#ifdef USE_STRUCT_CALLBACKS
81#define YAHOO_CALLBACK_TYPE(x)  (*x)
82struct yahoo_callbacks {
83#else
84#define YAHOO_CALLBACK_TYPE(x)  x
85#endif
86
87/*
88 * Name: ext_yahoo_login_response
89 *      Called when the login process is complete
90 * Params:
91 *      id   - the id that identifies the server connection
92 *      succ - enum yahoo_login_status
93 *      url  - url to reactivate account if locked
94 */
95        void YAHOO_CALLBACK_TYPE(ext_yahoo_login_response) (int id, int succ,
96                const char *url);
97
98/*
99 * Name: ext_yahoo_got_buddies
100 *      Called when the contact list is got from the server
101 * Params:
102 *      id   - the id that identifies the server connection
103 *      buds - the buddy list
104 */
105        void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buddies) (int id, YList *buds);
106
107/*
108 * Name: ext_yahoo_got_ignore
109 *      Called when the ignore list is got from the server
110 * Params:
111 *      id   - the id that identifies the server connection
112 *      igns - the ignore list
113 */
114        void YAHOO_CALLBACK_TYPE(ext_yahoo_got_ignore) (int id, YList *igns);
115
116/*
117 * Name: ext_yahoo_got_identities
118 *      Called when the contact list is got from the server
119 * Params:
120 *      id   - the id that identifies the server connection
121 *      ids  - the identity list
122 */
123        void YAHOO_CALLBACK_TYPE(ext_yahoo_got_identities) (int id, YList *ids);
124
125/*
126 * Name: ext_yahoo_got_cookies
127 *      Called when the cookie list is got from the server
128 * Params:
129 *      id   - the id that identifies the server connection
130 */
131        void YAHOO_CALLBACK_TYPE(ext_yahoo_got_cookies) (int id);
132
133/*
134 * Name: ext_yahoo_got_ping
135 *      Called when the ping packet is received from the server
136 * Params:
137 *      id   - the id that identifies the server connection
138 *  errormsg - optional error message
139 */
140        void YAHOO_CALLBACK_TYPE(ext_yahoo_got_ping) (int id,
141                const char *errormsg);
142
143/*
144 * Name: ext_yahoo_status_changed
145 *      Called when remote user's status changes.
146 * Params:
147 *      id   - the id that identifies the server connection
148 *      who  - the handle of the remote user
149 *      stat - status code (enum yahoo_status)
150 *      msg  - the message if stat == YAHOO_STATUS_CUSTOM
151 *      away - whether the contact is away or not (YAHOO_STATUS_CUSTOM)
152 *      idle - this is the number of seconds he is idle [if he is idle]
153 *      mobile - this is set for mobile users/buddies
154 *      TODO: add support for pager, chat, and game states
155 */
156        void YAHOO_CALLBACK_TYPE(ext_yahoo_status_changed) (int id,
157                const char *who, int stat, const char *msg, int away, int idle,
158                int mobile);
159
160/*
161 * Name: ext_yahoo_got_buzz
162 *      Called when remote user sends you a buzz.
163 * Params:
164 *      id   - the id that identifies the server connection
165 *      me   - the identity the message was sent to
166 *      who  - the handle of the remote user
167 *      tm   - timestamp of message if offline
168 */
169        void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buzz) (int id, const char *me,
170                const char *who, long tm);
171
172/*
173 * Name: ext_yahoo_got_im
174 *      Called when remote user sends you a message.
175 * Params:
176 *      id   - the id that identifies the server connection
177 *      me   - the identity the message was sent to
178 *      who  - the handle of the remote user
179 *      msg  - the message - NULL if stat == 2
180 *      tm   - timestamp of message if offline
181 *      stat - message status - 0
182 *                              1
183 *                              2 == error sending message
184 *                              5
185 *      utf8 - whether the message is encoded as utf8 or not
186 */
187        void YAHOO_CALLBACK_TYPE(ext_yahoo_got_im) (int id, const char *me,
188                const char *who, const char *msg, long tm, int stat, int utf8);
189
190/*
191 * Name: ext_yahoo_got_conf_invite
192 *      Called when remote user sends you a conference invitation.
193 * Params:
194 *      id   - the id that identifies the server connection
195 *      me   - the identity the invitation was sent to
196 *      who  - the user inviting you
197 *      room - the room to join
198 *      msg  - the message
199 *      members - the initial members of the conference (null terminated list)
200 */
201        void YAHOO_CALLBACK_TYPE(ext_yahoo_got_conf_invite) (int id,
202                const char *me, const char *who, const char *room,
203                const char *msg, YList *members);
204
205/*
206 * Name: ext_yahoo_conf_userdecline
207 *      Called when someone declines to join the conference.
208 * Params:
209 *      id   - the id that identifies the server connection
210 *      me   - the identity in the conference
211 *      who  - the user who has declined
212 *      room - the room
213 *      msg  - the declining message
214 */
215        void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userdecline) (int id,
216                const char *me, const char *who, const char *room,
217                const char *msg);
218
219/*
220 * Name: ext_yahoo_conf_userjoin
221 *      Called when someone joins the conference.
222 * Params:
223 *      id   - the id that identifies the server connection
224 *      me   - the identity in the conference
225 *      who  - the user who has joined
226 *      room - the room joined
227 */
228        void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userjoin) (int id,
229                const char *me, const char *who, const char *room);
230
231/*
232 * Name: ext_yahoo_conf_userleave
233 *      Called when someone leaves the conference.
234 * Params:
235 *      id   - the id that identifies the server connection
236 *      me   - the identity in the conference
237 *      who  - the user who has left
238 *      room - the room left
239 */
240        void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userleave) (int id,
241                const char *me, const char *who, const char *room);
242
243/*
244 * Name: ext_yahoo_chat_cat_xml
245 *      Called when ?
246 * Params:
247 *      id      - the id that identifies the server connection
248 *      xml     - ?
249 */
250        void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_cat_xml) (int id,
251                const char *xml);
252
253/*
254 * Name: ext_yahoo_chat_join
255 *      Called when joining the chatroom.
256 * Params:
257 *      id      - the id that identifies the server connection
258 *      me   - the identity in the chatroom
259 *      room    - the room joined, used in all other chat calls, freed by
260 *                library after call
261 *      topic   - the topic of the room, freed by library after call
262 *      members - the initial members of the chatroom (null terminated YList
263 *                of yahoo_chat_member's) Must be freed by the client
264 *      fd      - the socket where the connection is coming from (for tracking)
265 */
266        void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_join) (int id, const char *me,
267                const char *room, const char *topic, YList *members, int fd);
268
269/*
270 * Name: ext_yahoo_chat_userjoin
271 *      Called when someone joins the chatroom.
272 * Params:
273 *      id   - the id that identifies the server connection
274 *      me   - the identity in the chatroom
275 *      room - the room joined
276 *      who  - the user who has joined, Must be freed by the client
277 */
278        void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_userjoin) (int id,
279                const char *me, const char *room,
280                struct yahoo_chat_member *who);
281
282/*
283 * Name: ext_yahoo_chat_userleave
284 *      Called when someone leaves the chatroom.
285 * Params:
286 *      id   - the id that identifies the server connection
287 *      me   - the identity in the chatroom
288 *      room - the room left
289 *      who  - the user who has left (Just the User ID)
290 */
291        void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_userleave) (int id,
292                const char *me, const char *room, const char *who);
293
294/*
295 * Name: ext_yahoo_chat_message
296 *      Called when someone messages in the chatroom.
297 * Params:
298 *      id   - the id that identifies the server connection
299 *      me   - the identity in the chatroom
300 *      room - the room
301 *      who  - the user who messaged (Just the user id)
302 *      msg  - the message
303 *      msgtype  - 1 = Normal message
304 *                 2 = /me type message
305 *      utf8 - whether the message is utf8 encoded or not
306 */
307        void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_message) (int id,
308                const char *me, const char *who, const char *room,
309                const char *msg, int msgtype, int utf8);
310
311/*
312 *
313 * Name: ext_yahoo_chat_yahoologout
314 *      called when yahoo disconnects your chat session
315 *      Note this is called whenver a disconnect happens, client or server
316 *      requested. Care should be taken to make sure you know the origin
317 *      of the disconnect request before doing anything here (auto-join's etc)
318 * Params:
319 *      id   - the id that identifies this connection
320 *      me   - the identity in the chatroom
321 * Returns:
322 *      nothing.
323 */
324        void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_yahoologout) (int id,
325                const char *me);
326
327/*
328 *
329 * Name: ext_yahoo_chat_yahooerror
330 *      called when yahoo sends back an error to you
331 *      Note this is called whenver chat message is sent into a room
332 *      in error (fd not connected, room doesn't exists etc)
333 *      Care should be taken to make sure you know the origin
334 *      of the error before doing anything about it.
335 * Params:
336 *      id   - the id that identifies this connection
337 *      me   - the identity in the chatroom
338 * Returns:
339 *      nothing.
340 */
341        void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_yahooerror) (int id,
342                const char *me);
343
344/*
345 * Name: ext_yahoo_conf_message
346 *      Called when someone messages in the conference.
347 * Params:
348 *      id   - the id that identifies the server connection
349 *      me   - the identity the conf message was sent to
350 *      who  - the user who messaged
351 *      room - the room
352 *      msg  - the message
353 *      utf8 - whether the message is utf8 encoded or not
354 */
355        void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_message) (int id,
356                const char *me, const char *who, const char *room,
357                const char *msg, int utf8);
358
359/*
360 * Name: ext_yahoo_got_file
361 *      Called when someone sends you a file
362 * Params:
363 *      id   - the id that identifies the server connection
364 *      me   - the identity the file was sent to
365 *      who  - the user who sent the file
366 *      url  - the file url
367 *      expires  - the expiry date of the file on the server (timestamp)
368 *      msg  - the message
369 *      fname- the file name if direct transfer
370 *      fsize- the file size if direct transfer
371 */
372void YAHOO_CALLBACK_TYPE(ext_yahoo_got_file)(int id, const char *me, const char *who, const char *url, long expires, const char *msg, const char *fname, unsigned long fesize);
373
374
375/*
376 * Name: ext_yahoo_contact_auth_request
377 *      Called when a contact wants to add you to his/her contact list
378 * Params:
379 *      id   - the id that identifies the server connection
380 *      myid - the identity s/he added
381 *      who  - who did it
382 *      msg  - any message sent
383 */
384void YAHOO_CALLBACK_TYPE(ext_yahoo_contact_auth_request)(int id, const char *myid, const char *who, const char *msg);
385
386
387/*
388 * Name: ext_yahoo_contact_added
389 *      Called when a contact is added to your list
390 * Params:
391 *      id   - the id that identifies the server connection
392 *      myid - the identity he was added to
393 *      who  - who was added
394 *      msg  - any message sent
395 */
396        void YAHOO_CALLBACK_TYPE(ext_yahoo_contact_added) (int id,
397                const char *myid, const char *who, const char *msg);
398
399/*
400 * Name: ext_yahoo_rejected
401 *      Called when a contact rejects your add
402 * Params:
403 *      id   - the id that identifies the server connection
404 *      who  - who rejected you
405 *      msg  - any message sent
406 */
407        void YAHOO_CALLBACK_TYPE(ext_yahoo_rejected) (int id, const char *who,
408                const char *msg);
409
410/*
411 * Name: ext_yahoo_typing_notify
412 *      Called when remote user starts or stops typing.
413 * Params:
414 *      id   - the id that identifies the server connection
415 *      me   - the handle of the identity the notification is sent to
416 *      who  - the handle of the remote user
417 *      stat - 1 if typing, 0 if stopped typing
418 */
419        void YAHOO_CALLBACK_TYPE(ext_yahoo_typing_notify) (int id,
420                const char *me, const char *who, int stat);
421
422/*
423 * Name: ext_yahoo_game_notify
424 *      Called when remote user starts or stops a game.
425 * Params:
426 *      id   - the id that identifies the server connection
427 *      me   - the handle of the identity the notification is sent to
428 *      who  - the handle of the remote user
429 *      stat - 1 if game, 0 if stopped gaming
430 */
431void YAHOO_CALLBACK_TYPE(ext_yahoo_game_notify)(int id, const char *me, const char *who, int stat);
432
433
434/*
435 * Name: ext_yahoo_mail_notify
436 *      Called when you receive mail, or with number of messages
437 * Params:
438 *      id   - the id that identifies the server connection
439 *      from - who the mail is from - NULL if only mail count
440 *      subj - the subject of the mail - NULL if only mail count
441 *      cnt  - mail count - 0 if new mail notification
442 */
443        void YAHOO_CALLBACK_TYPE(ext_yahoo_mail_notify) (int id,
444                const char *from, const char *subj, int cnt);
445
446/*
447 * Name: ext_yahoo_system_message
448 *      System message
449 * Params:
450 *      id   - the id that identifies the server connection
451 *      msg  - the message
452 */
453void YAHOO_CALLBACK_TYPE(ext_yahoo_system_message)(int id, const char *msg);
454
455/*
456 * Name: ext_yahoo_got_buddyicon
457 *      Buddy icon received
458 * Params:
459 *      id - the id that identifies the server connection
460 *      me - the handle of the identity the notification is sent to
461 *      who - the person the buddy icon is for
462 *      url - the url to use to load the icon
463 *      checksum - the checksum of the icon content
464 */
465        void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buddyicon) (int id,
466                const char *me, const char *who, const char *url, int checksum);
467
468/*
469 * Name: ext_yahoo_got_buddyicon_checksum
470 *      Buddy icon checksum received
471 * Params:
472 *      id - the id that identifies the server connection
473 *      me - the handle of the identity the notification is sent to
474 *      who - the yahoo id of the buddy icon checksum is for
475 *      checksum - the checksum of the icon content
476 */
477        void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buddyicon_checksum) (int id,
478                const char *me, const char *who, int checksum);
479
480/*
481 * Name: ext_yahoo_got_buddyicon_request
482 *      Buddy icon request received
483 * Params:
484 *      id - the id that identifies the server connection
485 *      me - the handle of the identity the notification is sent to
486 *      who - the yahoo id of the buddy that requested the buddy icon
487 */
488        void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buddyicon_request) (int id,
489                const char *me, const char *who);
490
491/*
492 * Name: ext_yahoo_got_buddyicon_request
493 *      Buddy icon request received
494 * Params:
495 *      id - the id that identifies the server connection
496 *      url - remote url, the uploaded buddy icon can be fetched from
497 */
498        void YAHOO_CALLBACK_TYPE(ext_yahoo_buddyicon_uploaded) (int id,
499                const char *url);
500
501/*
502 * Name: ext_yahoo_got_webcam_image
503 *      Called when you get a webcam update
504 *      An update can either be receiving an image, a part of an image or
505 *      just an update with a timestamp
506 * Params:
507 *      id         - the id that identifies the server connection
508 *      who        - the user who's webcam we're viewing
509 *      image      - image data
510 *      image_size - length of the image in bytes
511 *      real_size  - actual length of image data
512 *      timestamp  - milliseconds since the webcam started
513 *
514 *      If the real_size is smaller then the image_size then only part of
515 *      the image has been read. This function will keep being called till
516 *      the total amount of bytes in image_size has been read. The image
517 *      received is in JPEG-2000 Code Stream Syntax (ISO/IEC 15444-1).
518 *      The size of the image will be either 160x120 or 320x240.
519 *      Each webcam image contains a timestamp. This timestamp should be
520 *      used to keep the image in sync since some images can take longer
521 *      to transport then others. When image_size is 0 we can still receive
522 *      a timestamp to stay in sync
523 */
524        void YAHOO_CALLBACK_TYPE(ext_yahoo_got_webcam_image) (int id,
525                const char *who, const unsigned char *image,
526                unsigned int image_size, unsigned int real_size,
527                unsigned int timestamp);
528
529/*
530 * Name: ext_yahoo_webcam_invite
531 *      Called when you get a webcam invitation
532 * Params:
533 *      id   - the id that identifies the server connection
534 *      me   - identity the invitation is to
535 *      from - who the invitation is from
536 */
537        void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_invite) (int id,
538                const char *me, const char *from);
539
540/*
541 * Name: ext_yahoo_webcam_invite_reply
542 *      Called when you get a response to a webcam invitation
543 * Params:
544 *      id   - the id that identifies the server connection
545 *      me   - identity the invitation response is to
546 *      from - who the invitation response is from
547 *      accept - 0 (decline), 1 (accept)
548 */
549        void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_invite_reply) (int id,
550                const char *me, const char *from, int accept);
551
552/*
553 * Name: ext_yahoo_webcam_closed
554 *      Called when the webcam connection closed
555 * Params:
556 *      id   - the id that identifies the server connection
557 *      who  - the user who we where connected to
558 *      reason - reason why the connection closed
559 *               1 = user stopped broadcasting
560 *               2 = user cancelled viewing permission
561 *               3 = user declines permission
562 *               4 = user does not have webcam online
563 */
564        void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_closed) (int id,
565                const char *who, int reason);
566
567/*
568 * Name: ext_yahoo_got_search_result
569 *      Called when the search result received from server
570 * Params:
571 *      id       - the id that identifies the server connection
572 *      found    - total number of results returned in the current result set
573 *      start    - offset from where the current result set starts
574 *      total    - total number of results available (start + found <= total)
575 *      contacts - the list of results as a YList of yahoo_found_contact
576 *                 these will be freed after this function returns, so
577 *                 if you need to use the information, make a copy
578 */
579        void YAHOO_CALLBACK_TYPE(ext_yahoo_got_search_result) (int id,
580                int found, int start, int total, YList *contacts);
581
582/*
583 * Name: ext_yahoo_error
584 *      Called on error.
585 * Params:
586 *      id   - the id that identifies the server connection
587 *      err  - the error message
588 *      fatal- whether this error is fatal to the connection or not
589 *      num  - Which error is this
590 */
591        void YAHOO_CALLBACK_TYPE(ext_yahoo_error) (int id, const char *err,
592                int fatal, int num);
593
594/*
595 * Name: ext_yahoo_webcam_viewer
596 *      Called when a viewer disconnects/connects/requests to connect
597 * Params:
598 *      id  - the id that identifies the server connection
599 *      who - the viewer
600 *      connect - 0=disconnect 1=connect 2=request
601 */
602        void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_viewer) (int id,
603                const char *who, int connect);
604
605/*
606 * Name: ext_yahoo_webcam_data_request
607 *      Called when you get a request for webcam images
608 * Params:
609 *      id   - the id that identifies the server connection
610 *      send - whether to send images or not
611 */
612        void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_data_request) (int id,
613                int send);
614
615/*
616 * Name: ext_yahoo_log
617 *      Called to log a message.
618 * Params:
619 *      fmt  - the printf formatted message
620 * Returns:
621 *      0
622 */
623        int YAHOO_CALLBACK_TYPE(ext_yahoo_log) (const char *fmt, ...);
624
625/*
626 * Name: ext_yahoo_add_handler
627 *      Add a listener for the fd.  Must call yahoo_read_ready
628 *      when a YAHOO_INPUT_READ fd is ready and yahoo_write_ready
629 *      when a YAHOO_INPUT_WRITE fd is ready.
630 * Params:
631 *      id   - the id that identifies the server connection
632 *      fd   - the fd on which to listen
633 *      cond - the condition on which to call the callback
634 *      data - callback data to pass to yahoo_*_ready
635 *     
636 * Returns: a tag to be used when removing the handler
637 */
638        int YAHOO_CALLBACK_TYPE(ext_yahoo_add_handler) (int id, int fd,
639                yahoo_input_condition cond, void *data);
640
641/*
642 * Name: ext_yahoo_remove_handler
643 *      Remove the listener for the fd.
644 * Params:
645 *      id   - the id that identifies the connection
646 *      tag  - the handler tag to remove
647 */
648        void YAHOO_CALLBACK_TYPE(ext_yahoo_remove_handler) (int id, int tag);
649
650/*
651 * Name: ext_yahoo_connect
652 *      Connect to a host:port
653 * Params:
654 *      host - the host to connect to
655 *      port - the port to connect on
656 * Returns:
657 *      a unix file descriptor to the socket
658 */
659        int YAHOO_CALLBACK_TYPE(ext_yahoo_connect) (const char *host, int port);
660
661/*
662 * Name: ext_yahoo_connect_async
663 *      Connect to a host:port asynchronously. This function should return
664 *      immediately returing a tag used to identify the connection handler,
665 *      or a pre-connect error (eg: host name lookup failure).
666 *      Once the connect completes (successfully or unsuccessfully), callback
667 *      should be called (see the signature for yahoo_connect_callback).
668 *      The callback may safely be called before this function returns, but
669 *      it should not be called twice.
670 * Params:
671 *      id   - the id that identifies this connection
672 *      host - the host to connect to
673 *      port - the port to connect on
674 *      callback - function to call when connect completes
675 *      callback_data - data to pass to the callback function
676 * Returns:
677 *      a unix file descriptor to the socket
678 */
679        int YAHOO_CALLBACK_TYPE(ext_yahoo_connect_async) (int id,
680                const char *host, int port, yahoo_connect_callback callback,
681                void *callback_data);
682
683#ifdef USE_STRUCT_CALLBACKS
684};
685
686/*
687 * if using a callback structure, call yahoo_register_callbacks
688 * before doing anything else
689 */
690void yahoo_register_callbacks(struct yahoo_callbacks *tyc);
691
692#undef YAHOO_CALLBACK_TYPE
693
694#endif
695
696#ifdef __cplusplus
697}
698#endif
699
700#endif
701
Note: See TracBrowser for help on using the repository browser.