source: owl.h @ d768834

barnowl_perlaimdebianrelease-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since d768834 was 9c7a701, checked in by Alejandro R. Sedeño <asedeno@mit.edu>, 14 years ago
Initial select() changes. stdin, zephyr, jabber, and irc are checked and have dispatch functions. aim is hacked in -- not entirely pretty, but documented and isolated. We still want timers.
  • Property mode set to 100644
File size: 17.7 KB
RevLine 
[5ca5f8e]1/*  Copyright (c) 2004 James Kretchmar. All rights reserved.
2 *
3 *  Redistribution and use in source and binary forms, with or without
4 *  modification, are permitted provided that the following conditions are
5 *  met:
6 * 
7 *    * Redistributions of source code must retain the above copyright
8 *      notice, this list of conditions and the following disclaimer.
9 * 
10 *    * Redistributions in binary form must reproduce the above copyright
11 *      notice, this list of conditions and the following disclaimer in
12 *      the documentation and/or other materials provided with the
13 *      distribution.
14 * 
15 *    * Redistributions in any form must be accompanied by information on
16 *      how to obtain complete source code for the Owl software and any
17 *      accompanying software that uses the Owl software. The source code
18 *      must either be included in the distribution or be available for no
19 *      more than the cost of distribution plus a nominal fee, and must be
20 *      freely redistributable under reasonable conditions. For an
21 *      executable file, complete source code means the source code for
22 *      all modules it contains. It does not include source code for
23 *      modules or files that typically accompany the major components of
24 *      the operating system on which the executable file runs.
25 * 
26 *
27 *  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
28 *  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29 *  WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
30 *  NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
31 *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32 *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33 *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
34 *  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
35 *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
36 *  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
37 *  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 */
39
[7d4fbcd]40#ifndef INC_OWL_H
41#define INC_OWL_H
42
[1bdffcb]43#ifndef OWL_PERL
44#include <curses.h>
45#endif
[7d4fbcd]46#include <sys/param.h>
47#include <EXTERN.h>
48#include <netdb.h>
49#include <regex.h>
[d09e5a1]50#include <time.h>
[c9e72d1]51#include <signal.h>
[8232149]52#include <termios.h>
[d09e5a1]53#include <libfaim/aim.h>
[7d4fbcd]54#include "config.h"
[be0a79f]55#ifdef HAVE_LIBZEPHYR
[373b7e7]56#include <zephyr/zephyr.h>
[be0a79f]57#endif
[e6449bc]58#ifdef HAVE_COM_ERR_H
59#include <com_err.h>
60#endif
61
[6922edd]62/* Perl and curses don't play nice. */
63#ifdef OWL_PERL
64typedef void WINDOW;
[18e28a4]65/* logout is defined in FreeBSD. */
66#define logout logout_
[88dc766]67/* aim.h defines bool */
68#define HAS_BOOL
[6922edd]69#include <perl.h>
[18e28a4]70#undef logout
[6922edd]71#include "XSUB.h"
72#else
73typedef void SV;
74#endif
75
[1aee7d9]76static const char owl_h_fileIdent[] = "$Id$";
77
[88dc766]78#define BARNOWL_STRINGIFY(x) _STRINGIFY(x)
[d08162a]79#define _STRINGIFY(x) #x
80
81#ifndef OWL_SVN_REVNO
82#define OWL_SVN_REVNO ????
83#endif
84
[88dc766]85#define OWL_VERSION_STRING "r" BARNOWL_STRINGIFY(OWL_SVN_REVNO)
[d08162a]86
[2a2bb60]87
88/* Feature that is being tested to redirect stderr through a pipe.
89 * There may still be some portability problems with this. */
90#define OWL_STDERR_REDIR 1
[7d4fbcd]91
92#define OWL_DEBUG 0
93#define OWL_DEBUG_FILE "/var/tmp/owldebug"
94
[bd3f232]95#define OWL_CONFIG_DIR "/.owl"             /* this is relative to the user's home directory */
[38cf544c]96#define OWL_STARTUP_FILE "/.owl/startup"   /* this is relative to the user's home directory */
97
[7d4fbcd]98#define OWL_FMTEXT_ATTR_NONE      0
99#define OWL_FMTEXT_ATTR_BOLD      1
100#define OWL_FMTEXT_ATTR_REVERSE   2
101#define OWL_FMTEXT_ATTR_UNDERLINE 4
102
103#define OWL_COLOR_BLACK     0
104#define OWL_COLOR_RED       1
105#define OWL_COLOR_GREEN     2
106#define OWL_COLOR_YELLOW    3
107#define OWL_COLOR_BLUE      4
108#define OWL_COLOR_MAGENTA   5
109#define OWL_COLOR_CYAN      6
110#define OWL_COLOR_WHITE     7
[c2c5c77]111#define OWL_COLOR_DEFAULT   -1
[7d4fbcd]112
113#define OWL_EDITWIN_STYLE_MULTILINE 0
114#define OWL_EDITWIN_STYLE_ONELINE   1
115
[f4d0975]116#define OWL_PROTOCOL_ZEPHYR         0
117#define OWL_PROTOCOL_AIM            1
118#define OWL_PROTOCOL_JABBER         2
119#define OWL_PROTOCOL_ICQ            3
120#define OWL_PROTOCOL_YAHOO          4
121#define OWL_PROTOCOL_MSN            5
122
[4b464a4]123#define OWL_MESSAGE_DIRECTION_NONE  0
124#define OWL_MESSAGE_DIRECTION_IN    1
125#define OWL_MESSAGE_DIRECTION_OUT   2
[7d4fbcd]126
[afbf668]127#define OWL_MUX_READ   1
128#define OWL_MUX_WRITE  2
129#define OWL_MUX_EXCEPT 4
130
[7d4fbcd]131#define OWL_DIRECTION_NONE      0
132#define OWL_DIRECTION_DOWNWARDS 1
133#define OWL_DIRECTION_UPWARDS   2
134
[12c35df]135#define OWL_LOGGING_DIRECTION_BOTH 0
136#define OWL_LOGGING_DIRECTION_IN   1
137#define OWL_LOGGING_DIRECTION_OUT  2
138
[88736cb]139#define OWL_SCROLLMODE_NORMAL      0
140#define OWL_SCROLLMODE_TOP         1
141#define OWL_SCROLLMODE_NEARTOP     2
142#define OWL_SCROLLMODE_CENTER      3
143#define OWL_SCROLLMODE_PAGED       4
[aa2f33b3]144#define OWL_SCROLLMODE_PAGEDCENTER 5
145
[bd3f232]146#define OWL_STYLE_TYPE_INTERNAL  0
147#define OWL_STYLE_TYPE_PERL      1
148
[7d4fbcd]149#define OWL_TAB               3  /* This *HAS* to be the size of TABSTR below */
150#define OWL_TABSTR        "   "
151#define OWL_MSGTAB            7
152#define OWL_TYPWIN_SIZE       8
153#define OWL_HISTORYSIZE       50
154
155/* Indicate current state, as well as what is allowed */
156#define OWL_CTX_ANY          0xffff
157/* Only one of these may be active at a time... */
158#define OWL_CTX_MODE_BITS    0x000f
159#define OWL_CTX_STARTUP      0x0001
160#define OWL_CTX_READCONFIG   0x0002
161#define OWL_CTX_INTERACTIVE  0x0004
162/* Only one of these may be active at a time... */
163#define OWL_CTX_ACTIVE_BITS  0xfff0
164#define OWL_CTX_POPWIN       0x00f0
165#define OWL_CTX_POPLESS      0x0010
166#define OWL_CTX_RECWIN       0x0f00
167#define OWL_CTX_RECV         0x0100
168#define OWL_CTX_TYPWIN       0xf000
[cf83b7a]169#define OWL_CTX_EDIT         0x7000
[7d4fbcd]170#define OWL_CTX_EDITLINE     0x1000
171#define OWL_CTX_EDITMULTI    0x2000
[cf83b7a]172#define OWL_CTX_EDITRESPONSE 0x4000
[7d4fbcd]173
174#define OWL_USERCLUE_NONE       0
175#define OWL_USERCLUE_CLASSES    1
176#define OWL_USERCLUE_FOOBAR     2
177#define OWL_USERCLUE_BAZ        4
178
179#define OWL_WEBBROWSER_NONE     0
180#define OWL_WEBBROWSER_NETSCAPE 1
181#define OWL_WEBBROWSER_GALEON   2
[ae9e6be]182#define OWL_WEBBROWSER_OPERA    3
[7d4fbcd]183
184#define OWL_VARIABLE_OTHER      0
185#define OWL_VARIABLE_INT        1
186#define OWL_VARIABLE_BOOL       2
187#define OWL_VARIABLE_STRING     3
188
189#define OWL_FILTER_MAX_DEPTH    300
190
[4b464a4]191#define OWL_KEYMAP_MAXSTACK     20
[7d4fbcd]192
[4b464a4]193#define OWL_KEYBINDING_COMMAND  1   /* command string */
194#define OWL_KEYBINDING_FUNCTION 2   /* function taking no args */
[7d4fbcd]195
[4b464a4]196#define OWL_DEFAULT_ZAWAYMSG    "I'm sorry, but I am currently away from the terminal and am\nnot able to receive your message.\n"
[4b660cc]197#define OWL_DEFAULT_AAWAYMSG    "I'm sorry, but I am currently away from the terminal and am\nnot able to receive your message.\n"
[7d4fbcd]198
[4b464a4]199#define OWL_INCLUDE_REG_TESTS   1  /* whether to build in regression tests */
[7d4fbcd]200
[1c7a4e0]201#define OWL_CMD_ALIAS_SUMMARY_PREFIX "command alias to: "
[7d4fbcd]202
[e7cc1c3]203#define OWL_WEBZEPHYR_PRINCIPAL "daemon.webzephyr"
[1d3e925]204#define OWL_WEBZEPHYR_CLASS     "webzephyr"
205#define OWL_WEBZEPHYR_OPCODE    "webzephyr"
[e7cc1c3]206
[80e54a7]207#define OWL_REGEX_QUOTECHARS    "+*.?[]^\\${}()"
[bc08664]208#define OWL_REGEX_QUOTEWITH     "\\"
209
[0435c7d]210#if defined(HAVE_DES_STRING_TO_KEY) && defined(HAVE_DES_KEY_SCHED) && defined(HAVE_DES_ECB_ENCRYPT)
[c86a35c]211#define OWL_ENABLE_ZCRYPT 1
[c269e22]212#endif
213
[f87c490]214#define OWL_META(key) ((key)|0200)
215/* OWL_CTRL is definied in kepress.c */
[7d4fbcd]216
217#define LINE 2048
218
219typedef struct _owl_variable {
220  char *name;
221  int   type;  /* OWL_VARIABLE_* */
222  void *pval_default;  /* for types other and string */
223  int   ival_default;  /* for types int and bool     */
224  char *validsettings;          /* documentation of valid settings */
[aa2f33b3]225  char *summary;                /* summary of usage */
226  char *description;            /* detailed description */
[7d4fbcd]227  void *val;                    /* current value */
228  int  (*validate_fn)(struct _owl_variable *v, void *newval);
229                                /* returns 1 if newval is valid */
230  int  (*set_fn)(struct _owl_variable *v, void *newval); 
231                                /* sets the variable to a value
232                                 * of the appropriate type.
233                                 * unless documented, this
234                                 * should make a copy.
235                                 * returns 0 on success. */
236  int  (*set_fromstring_fn)(struct _owl_variable *v, char *newval);
237                                /* sets the variable to a value
238                                 * of the appropriate type.
239                                 * unless documented, this
240                                 * should make a copy.
241                                 * returns 0 on success. */
242  void *(*get_fn)(struct _owl_variable *v);
243                                /* returns a reference to the current value.
244                                 * WARNING:  this approach is hard to make
245                                 * thread-safe... */
246  int  (*get_tostring_fn)(struct _owl_variable *v, 
247                          char *buf, int bufsize, void *val); 
248                                /* converts val to a string
249                                 * and puts into buf */
250  void  (*free_fn)(struct _owl_variable *v);
251                                /* frees val as needed */
252} owl_variable;
253
254typedef struct _owl_fmtext {
255  int textlen;
[a387d12e]256  int bufflen;
[7d4fbcd]257  char *textbuff;
258  char *fmbuff;
[c2c5c77]259  short *fgcolorbuff;
260  short *bgcolorbuff;
[7d4fbcd]261} owl_fmtext;
262
263typedef struct _owl_list {
264  int size;
265  int avail;
266  void **list;
267} owl_list;
268
269typedef struct _owl_dict_el {
270  char *k;                      /* key   */
271  void *v;                      /* value */
272} owl_dict_el;
273
274typedef struct _owl_dict {
275  int size;
276  int avail;
277  owl_dict_el *els;             /* invariant: sorted by k */
278} owl_dict;
279typedef owl_dict owl_vardict;   /* dict of variables */
280typedef owl_dict owl_cmddict;   /* dict of commands */
281
282typedef struct _owl_context {
283  int   mode;
284  void *data;           /* determined by mode */
285} owl_context;
286
287typedef struct _owl_cmd {       /* command */
288  char *name;
289
290  char *summary;                /* one line summary of command */
291  char *usage;                  /* usage synopsis */
292  char *description;            /* long description of command */
293
294  int validctx;                 /* bitmask of valid contexts */
295
296  /* we should probably have a type here that says which of
297   * the following is valid, and maybe make the below into a union... */
298
299  /* Only one of these may be non-NULL ... */
300
301  char *cmd_aliased_to;         /* what this command is aliased to... */
302 
303  /* These don't take any context */
304  char *(*cmd_args_fn)(int argc, char **argv, char *buff); 
305                                /* takes argv and the full command as buff.
306                                 * caller must free return value if !NULL */
307  void (*cmd_v_fn)(void);       /* takes no args */
308  void (*cmd_i_fn)(int i);      /* takes an int as an arg */
309
310  /* The following also take the active context if it's valid */
311  char *(*cmd_ctxargs_fn)(void *ctx, int argc, char **argv, char *buff); 
312                                /* takes argv and the full command as buff.
313                                 * caller must free return value if !NULL */
314  void (*cmd_ctxv_fn)(void *ctx);               /* takes no args */
315  void (*cmd_ctxi_fn)(void *ctx, int i);        /* takes an int as an arg */
[6922edd]316  SV *cmd_perl;                                /* Perl closure that takes a list of args */
[7d4fbcd]317} owl_cmd;
318
319
320typedef struct _owl_zwrite {
[ce7db4d]321  char *class;
322  char *inst;
323  char *realm;
324  char *opcode;
[56330ff]325  char *zsig;
[ce7db4d]326  char *message;
[7d4fbcd]327  owl_list recips;
328  int cc;
329  int noping;
330} owl_zwrite;
331
[d0d65df]332typedef struct _owl_pair {
333  void *key;
334  void *value;
335} owl_pair;
336
[a387d12e]337struct _owl_fmtext_cache;
338
[7d4fbcd]339typedef struct _owl_message {
340  int id;
[4b464a4]341  int direction;
[be0a79f]342#ifdef HAVE_LIBZEPHYR
[7d4fbcd]343  ZNotice_t notice;
[be0a79f]344#endif
[a387d12e]345  struct _owl_fmtext_cache * fmtext;
[7d4fbcd]346  int delete;
[8298425]347  char *hostname;
[65ad073]348  owl_list attributes;            /* this is a list of pairs */
[25dd31a]349  char *timestr;
350  time_t time;
[7d4fbcd]351  char *zwriteline;
352} owl_message;
353
[a387d12e]354#define OWL_FMTEXT_CACHE_SIZE 1000
355/* We cache the saved fmtexts for the last bunch of messages we
356   rendered */
357typedef struct _owl_fmtext_cache {
358    owl_message * message;
359    owl_fmtext fmtext;
360} owl_fmtext_cache;
361
[bd3f232]362typedef struct _owl_style {
363  char *name;
[f1e629d]364  char *description;
[bd3f232]365  int type;
366  char *perlfuncname;
367  void (*formatfunc) (owl_fmtext *fm, owl_message *m);
368} owl_style;
369
[7d4fbcd]370typedef struct _owl_mainwin {
371  int curtruncated;
[f2e36b5]372  int lasttruncated;
[7d4fbcd]373  int lastdisplayed;
374} owl_mainwin;
375
376typedef struct _owl_viewwin {
377  owl_fmtext fmtext;
378  int textlines;
379  int topline;
380  int rightshift;
381  int winlines, wincols;
382  WINDOW *curswin;
[afbf668]383  void (*onclose_hook) (struct _owl_viewwin *vwin, void *data);
384  void *onclose_hook_data;
[7d4fbcd]385} owl_viewwin;
386 
387typedef struct _owl_popwin {
388  WINDOW *borderwin;
389  WINDOW *popwin;
390  int lines;
391  int cols;
392  int active;
393  int needsfirstrefresh;
394  void (*handler) (int ch);
395} owl_popwin;
396
[afbf668]397typedef struct _owl_popexec {
398  int refcount;
399  owl_viewwin *vwin;
400  int winactive;
401  int pid;                      /* or 0 if it has terminated */
402  int rfd; 
403} owl_popexec;
404
[7d4fbcd]405typedef struct _owl_messagelist {
406  owl_list list;
407} owl_messagelist;
408
409typedef struct _owl_regex {
410  int negate;
411  char *string;
412  regex_t re;
413} owl_regex;
414
415typedef struct _owl_filterelement {
[cb769bb]416  int (*match_message)(struct _owl_filterelement *fe, owl_message *m);
417  /* Append a string representation of the filterelement onto buf*/
418  void (*print_elt)(struct _owl_filterelement *fe, char * buf);
419  /* Operands for and,or,not*/
420  struct _owl_filterelement *left, *right;
421  /* For regex filters*/
[7d4fbcd]422  owl_regex re;
[cb769bb]423  /* Used by regexes, filter references, and perl */
424  char *field;
[7d4fbcd]425} owl_filterelement;
426
427typedef struct _owl_filter {
428  char *name;
429  int polarity;
[cb769bb]430  owl_filterelement * root;
[8fa9562]431  int fgcolor;
432  int bgcolor;
[59cf91c]433  int cachedmsgid;  /* cached msgid: should move into view eventually */
[7d4fbcd]434} owl_filter;
435
436typedef struct _owl_view {
[c3ab155]437  char *name;
[7d4fbcd]438  owl_filter *filter;
439  owl_messagelist ml;
[c3ab155]440  owl_style *style;
[7d4fbcd]441} owl_view;
442
443typedef struct _owl_history {
444  owl_list hist;
445  int cur;
446  int touched;
447  int partial;
[12c35df]448  int repeats;
[7d4fbcd]449} owl_history;
450
[10b866d]451typedef struct _owl_editwin {
452  char *buff;
453  owl_history *hist;
454  int bufflen;
455  int allocated;
456  int buffx, buffy;
457  int topline;
458  int winlines, wincols, fillcol, wrapcol;
459  WINDOW *curswin;
460  int style;
461  int lock;
462  int dotsend;
[c9334b1]463  int echochar;
[1b6b2f3]464
465  char *command;
466  void (*callback)(struct _owl_editwin*);
467  void *cbdata;
[10b866d]468} owl_editwin;
469
[afbf668]470typedef struct _owl_mux {
471  int handle;                   /* for referencing this */
472  int active;                   /* has this been deleted? */
473  int fd;                     
474  int eventmask;                /* bitmask of OWL_MUX_* */
475  void (*handler_fn)(int handle, int fd, int eventmask, void *data);
476  void *data;                   /* data reference to pass to callback */
477} owl_mux;
478typedef owl_list owl_muxevents;
479
[7d4fbcd]480typedef struct _owl_keybinding {
481  int  *j;                      /* keypress stack (0-terminated) */ 
482  int   type;                   /* command or function? */
483  char *desc;                   /* description (or "*user*") */
484  char *command;                /* command, if of type command */
485  void (*function_fn)(void);    /* function ptr, if of type function */
486} owl_keybinding;
487
488typedef struct _owl_keymap {
489  char     *name;               /* name of keymap */
490  char     *desc;               /* description */
491  owl_list  bindings;           /* key bindings */
492  struct _owl_keymap *submap;   /* submap */
493  void (*default_fn)(int j);    /* default action (takes a keypress) */
494  void (*prealways_fn)(int j);  /* always called before a keypress is received */
495  void (*postalways_fn)(int j); /* always called after keypress is processed */
496} owl_keymap;
497
498typedef struct _owl_keyhandler {
499  owl_dict  keymaps;            /* dictionary of keymaps */
500  owl_keymap *active;           /* currently active keymap */
501  int       in_esc;             /* escape pressed? */
502  int       kpstack[OWL_KEYMAP_MAXSTACK+1]; /* current stack of keypresses */
503  int       kpstackpos;         /* location in stack (-1 = none) */
504} owl_keyhandler;
505
[f4d0975]506typedef struct _owl_buddy {
507  int proto;
508  char *name;
509  int isidle;
510  int idlesince;
511} owl_buddy;
512
[aa5f725]513typedef struct _owl_buddylist {
514  owl_list buddies;
515} owl_buddylist;
516
[5a95b69]517typedef struct _owl_zbuddylist {
518  owl_list zusers;
519} owl_zbuddylist;
520
[6a415e9]521typedef struct _owl_timer {
522  int direction;
523  time_t starttime;
524  int start;
525} owl_timer;
[aa5f725]526
[ec6ff52]527typedef struct _owl_errqueue {
528  owl_list errlist;
529} owl_errqueue;
530
[8fa9562]531typedef struct _owl_colorpair_mgr {
[99c7549]532  int next;
[c2c5c77]533  short **pairs;
[8fa9562]534} owl_colorpair_mgr;
535
[124aebc]536typedef struct _owl_obarray {
537  owl_list strings;
538} owl_obarray;
539
[9c7a701]540typedef struct _owl_dispatch {
541  int fd;           /* FD to watch for dispatch. */
542  void (*cfunc)();  /* C function to dispatch to. */
543  SV *pfunc;        /* Perl function to dispatch to. */
544} owl_dispatch;
545
[7d4fbcd]546typedef struct _owl_global {
547  owl_mainwin mw;
548  owl_popwin pw;
[10b866d]549  owl_history cmdhist;          /* command history */
550  owl_history msghist;          /* outgoing message history */
[7d4fbcd]551  owl_keyhandler kh;
552  owl_list filterlist;
553  owl_list puntlist;
[afbf668]554  owl_muxevents muxevents;      /* fds to dispatch on */
[7d4fbcd]555  owl_vardict vars;
556  owl_cmddict cmds;
557  owl_context ctx;
[ec6ff52]558  owl_errqueue errqueue;
[7d4fbcd]559  int lines, cols;
560  int curmsg, topmsg;
561  int curmsg_vert_offset;
562  owl_view current_view;
563  owl_messagelist msglist;
564  WINDOW *recwin, *sepwin, *msgwin, *typwin;
565  int needrefresh;
566  int rightshift;
567  int resizepending;
568  int recwinlines;
569  int typwinactive;
[a8938c7]570  char *thishost;
571  char *homedir;
[b363d83]572  char *confdir;
573  char *startupfile;
[7d4fbcd]574  int direction;
575  int zaway;
576  char *cur_zaway_msg;
577  int haveconfig;
578  int config_format;
[1b6b2f3]579  void *buffercbdata;
[7d4fbcd]580  owl_editwin tw;
581  owl_viewwin vw;
582  void *perl;
583  int debug;
[7f792c1]584  time_t starttime;
585  time_t lastinputtime;
[a8938c7]586  char *startupargs;
[7d4fbcd]587  int userclue;
588  int nextmsgid;
589  int hascolors;
590  int colorpairs;
[8fa9562]591  owl_colorpair_mgr cpmgr;
[1fd0b25]592  int searchactive;
[700c712]593  int newmsgproc_pid;
[8262340]594  int malloced, freed;
[1fd0b25]595  char *searchstring;
[d09e5a1]596  aim_session_t aimsess;
[c15bbfb]597  aim_conn_t bosconn;
[6a415e9]598  owl_timer aim_noop_timer;
599  owl_timer aim_ignorelogin_timer;
[de03334]600  owl_timer aim_buddyinfo_timer;
[bd3f232]601  int aim_loggedin;         /* true if currently logged into AIM */
[a352335c]602  int aim_doprocessing;     /* true if we should process AIM events (like pending login) */
[bd3f232]603  char *aim_screenname;     /* currently logged in AIM screen name */
604  owl_buddylist buddylist;  /* list of logged in AIM buddies */
605  owl_list messagequeue;    /* for queueing up aim and other messages */
[f1e629d]606  owl_dict styledict;       /* global dictionary of available styles */
[cf83b7a]607  char *response;           /* response to the last question asked */
[09489b89]608  int havezephyr;
609  int haveaim;
[c9e72d1]610  int got_err_signal;       /* 1 if we got an unexpected signal */
[5a95b69]611  siginfo_t err_signal_info;
612  owl_zbuddylist zbuddies;
613  owl_timer zephyr_buddycheck_timer;
[8232149]614  struct termios startup_tio;
[8e401cae]615  owl_obarray obarray;
[9c7a701]616  owl_list dispatchlist;
[7d4fbcd]617} owl_global;
618
619/* globals */
[b2b0773]620extern owl_global g;
[7d4fbcd]621
622#include "owl_prototypes.h"
623
624/* these are missing from the zephyr includes for some reason */
[be0a79f]625#ifdef HAVE_LIBZEPHYR
[7d4fbcd]626int ZGetSubscriptions(ZSubscription_t *, int *);
627int ZGetLocations(ZLocations_t *,int *);
[be0a79f]628#endif
[7d4fbcd]629
630#endif /* INC_OWL_H */
Note: See TracBrowser for help on using the repository browser.