Merged pidgin/main into default
[pidgin-git.git] / libpurple / protocols / zephyr / ZSendList.c
blobfc19a1c758d78ecf1f09207702e8308fb8fa4074
1 /* This file is part of the Project Athena Zephyr Notification System.
2 * It contains source for the ZSendList function.
4 * Created by: Robert French
6 * Copyright (c) 1987 by the Massachusetts Institute of Technology.
7 * For copying and distribution information, see the file
8 * "mit-copyright.h".
9 */
11 #include "internal.h"
13 Code_t ZSendList(notice, list, nitems, cert_routine)
14 ZNotice_t *notice;
15 char *list[];
16 int nitems;
17 Z_AuthProc cert_routine;
19 return(ZSrvSendList(notice, list, nitems, cert_routine, Z_XmitFragment));
22 Code_t ZSrvSendList(notice, list, nitems, cert_routine, send_routine)
23 ZNotice_t *notice;
24 char *list[];
25 int nitems;
26 Z_AuthProc cert_routine;
27 Code_t (*send_routine)();
29 Code_t retval;
30 ZNotice_t newnotice;
31 char *buffer;
32 int len;
34 if ((retval = ZFormatNoticeList(notice, list, nitems, &buffer,
35 &len, cert_routine)) != ZERR_NONE)
36 return (retval);
38 if ((retval = ZParseNotice(buffer, len, &newnotice)) != ZERR_NONE)
39 return (retval);
41 retval = Z_SendFragmentedNotice(&newnotice, len, cert_routine,
42 send_routine);
44 free(buffer);
46 return (retval);