source: owl.h @ 3cc1582

barnowl_perlaimdebianrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 3cc1582 was f92080c, checked in by Alejandro R. Sedeño <asedeno@mit.edu>, 17 years ago
Merged revisions 831-846 via svnmerge from file:///afs/sipb.mit.edu/project/barnowl/src/svn/trunk ........ r834 | chmrr | 2008-01-11 17:11:00 -0500 (Fri, 11 Jan 2008) | 3 lines r1876@utwig: chmrr | 2008-01-11 17:08:47 -0500 * Default connections on a per-channel-name basis ........ r836 | nelhage | 2008-01-11 22:15:06 -0500 (Fri, 11 Jan 2008) | 2 lines Nuke the stylefunc_default C code ........ r837 | nelhage | 2008-01-11 22:17:19 -0500 (Fri, 11 Jan 2008) | 1 line Nuke the vt style as well ........ r841 | nelhage | 2008-01-11 22:40:17 -0500 (Fri, 11 Jan 2008) | 2 lines Nuke a warning ........ r845 | nelhage | 2008-01-12 01:11:53 -0500 (Sat, 12 Jan 2008) | 2 lines I'm tired of those stupid warning. ........
  • Property mode set to 100644
File size: 18.6 KB
Line 
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
40#ifndef INC_OWL_H
41#define INC_OWL_H
42
43#ifndef OWL_PERL
44#include <curses.h>
45#endif
46#include <sys/param.h>
47#include <EXTERN.h>
48#include <netdb.h>
49#include <regex.h>
50#include <time.h>
51#include <signal.h>
52#include <termios.h>
53#include <libfaim/aim.h>
54#include <wchar.h>
55#include "config.h"
56#include "glib.h"
57#ifdef HAVE_LIBZEPHYR
58#include <zephyr/zephyr.h>
59#endif
60#ifdef HAVE_COM_ERR_H
61#include <com_err.h>
62#endif
63
64/* Perl and curses don't play nice. */
65#ifdef OWL_PERL
66typedef void WINDOW;
67/* logout is defined in FreeBSD. */
68#define logout logout_
69/* aim.h defines bool */
70#define HAS_BOOL
71#include <perl.h>
72#undef logout
73#include "XSUB.h"
74#else
75typedef void SV;
76#endif
77
78static const char owl_h_fileIdent[] = "$Id$";
79
80#define BARNOWL_STRINGIFY(x) _STRINGIFY(x)
81#define _STRINGIFY(x) #x
82
83#ifndef OWL_SVN_REVNO
84#define OWL_SVN_REVNO ????
85#endif
86
87#define OWL_VERSION_STRING "r" BARNOWL_STRINGIFY(OWL_SVN_REVNO)
88
89
90/* Feature that is being tested to redirect stderr through a pipe.
91 * There may still be some portability problems with this. */
92#define OWL_STDERR_REDIR 1
93
94#define OWL_DEBUG 0
95#define OWL_DEBUG_FILE "/var/tmp/owldebug"
96
97#define OWL_CONFIG_DIR "/.owl"             /* this is relative to the user's home directory */
98#define OWL_STARTUP_FILE "/.owl/startup"   /* this is relative to the user's home directory */
99
100#define OWL_FMTEXT_ATTR_NONE      0
101#define OWL_FMTEXT_ATTR_BOLD      1
102#define OWL_FMTEXT_ATTR_REVERSE   2
103#define OWL_FMTEXT_ATTR_UNDERLINE 4
104
105#define OWL_FMTEXT_UC_BASE 0x100000 /* Unicode Plane 16 - Supplementary Private Use Area-B*/
106#define OWL_FMTEXT_UC_ATTR ( OWL_FMTEXT_UC_BASE | 0x800 )
107#define OWL_FMTEXT_UC_ATTR_MASK 0x7
108#define OWL_FMTEXT_UC_COLOR_BASE ( OWL_FMTEXT_UC_BASE | 0x400 )
109#define OWL_FMTEXT_UC_FGCOLOR OWL_FMTEXT_UC_COLOR_BASE
110#define OWL_FMTEXT_UC_BGCOLOR ( OWL_FMTEXT_UC_COLOR_BASE | 0x200 )
111#define OWL_FMTEXT_UC_DEFAULT_COLOR 0x100
112#define OWL_FMTEXT_UC_FGDEFAULT ( OWL_FMTEXT_UC_FGCOLOR | OWL_FMTEXT_UC_DEFAULT_COLOR )
113#define OWL_FMTEXT_UC_BGDEFAULT ( OWL_FMTEXT_UC_BGCOLOR | OWL_FMTEXT_UC_DEFAULT_COLOR )
114#define OWL_FMTEXT_UC_COLOR_MASK 0xFF
115#define OWL_FMTEXT_UC_ALLCOLOR_MASK ( OWL_FMTEXT_UC_COLOR_MASK | OWL_FMTEXT_UC_DEFAULT_COLOR | 0x200)
116#define OWL_FMTEXT_UC_STARTBYTE_UTF8 '\xf4'
117
118#define OWL_FMTEXT_UTF8_ATTR_NONE "\xf4\x80\xa0\x80"
119#define OWL_FMTEXT_UTF8_FGDEFAULT "\xf4\x80\x94\x80"
120#define OWL_FMTEXT_UTF8_BGDEFAULT "\xf4\x80\x96\x80"
121
122
123
124
125#define OWL_COLOR_BLACK     0
126#define OWL_COLOR_RED       1
127#define OWL_COLOR_GREEN     2
128#define OWL_COLOR_YELLOW    3
129#define OWL_COLOR_BLUE      4
130#define OWL_COLOR_MAGENTA   5
131#define OWL_COLOR_CYAN      6
132#define OWL_COLOR_WHITE     7
133#define OWL_COLOR_DEFAULT   -1
134
135#define OWL_EDITWIN_STYLE_MULTILINE 0
136#define OWL_EDITWIN_STYLE_ONELINE   1
137
138#define OWL_PROTOCOL_ZEPHYR         0
139#define OWL_PROTOCOL_AIM            1
140#define OWL_PROTOCOL_JABBER         2
141#define OWL_PROTOCOL_ICQ            3
142#define OWL_PROTOCOL_YAHOO          4
143#define OWL_PROTOCOL_MSN            5
144
145#define OWL_MESSAGE_DIRECTION_NONE  0
146#define OWL_MESSAGE_DIRECTION_IN    1
147#define OWL_MESSAGE_DIRECTION_OUT   2
148
149#define OWL_MUX_READ   1
150#define OWL_MUX_WRITE  2
151#define OWL_MUX_EXCEPT 4
152
153#define OWL_DIRECTION_NONE      0
154#define OWL_DIRECTION_DOWNWARDS 1
155#define OWL_DIRECTION_UPWARDS   2
156
157#define OWL_LOGGING_DIRECTION_BOTH 0
158#define OWL_LOGGING_DIRECTION_IN   1
159#define OWL_LOGGING_DIRECTION_OUT  2
160
161#define OWL_SCROLLMODE_NORMAL      0
162#define OWL_SCROLLMODE_TOP         1
163#define OWL_SCROLLMODE_NEARTOP     2
164#define OWL_SCROLLMODE_CENTER      3
165#define OWL_SCROLLMODE_PAGED       4
166#define OWL_SCROLLMODE_PAGEDCENTER 5
167
168#define OWL_STYLE_TYPE_INTERNAL  0
169#define OWL_STYLE_TYPE_PERL      1
170
171#define OWL_TAB               3  /* This *HAS* to be the size of TABSTR below */
172#define OWL_TABSTR        "   "
173#define OWL_MSGTAB            7
174#define OWL_TYPWIN_SIZE       8
175#define OWL_HISTORYSIZE       50
176
177/* Indicate current state, as well as what is allowed */
178#define OWL_CTX_ANY          0xffff
179/* Only one of these may be active at a time... */
180#define OWL_CTX_MODE_BITS    0x000f
181#define OWL_CTX_STARTUP      0x0001
182#define OWL_CTX_READCONFIG   0x0002
183#define OWL_CTX_INTERACTIVE  0x0004
184/* Only one of these may be active at a time... */
185#define OWL_CTX_ACTIVE_BITS  0xfff0
186#define OWL_CTX_POPWIN       0x00f0
187#define OWL_CTX_POPLESS      0x0010
188#define OWL_CTX_RECWIN       0x0f00
189#define OWL_CTX_RECV         0x0100
190#define OWL_CTX_TYPWIN       0xf000
191#define OWL_CTX_EDIT         0x7000
192#define OWL_CTX_EDITLINE     0x1000
193#define OWL_CTX_EDITMULTI    0x2000
194#define OWL_CTX_EDITRESPONSE 0x4000
195
196#define OWL_USERCLUE_NONE       0
197#define OWL_USERCLUE_CLASSES    1
198#define OWL_USERCLUE_FOOBAR     2
199#define OWL_USERCLUE_BAZ        4
200
201#define OWL_WEBBROWSER_NONE     0
202#define OWL_WEBBROWSER_NETSCAPE 1
203#define OWL_WEBBROWSER_GALEON   2
204#define OWL_WEBBROWSER_OPERA    3
205
206#define OWL_VARIABLE_OTHER      0
207#define OWL_VARIABLE_INT        1
208#define OWL_VARIABLE_BOOL       2
209#define OWL_VARIABLE_STRING     3
210
211#define OWL_FILTER_MAX_DEPTH    300
212
213#define OWL_KEYMAP_MAXSTACK     20
214
215#define OWL_KEYBINDING_COMMAND  1   /* command string */
216#define OWL_KEYBINDING_FUNCTION 2   /* function taking no args */
217
218#define OWL_DEFAULT_ZAWAYMSG    "I'm sorry, but I am currently away from the terminal and am\nnot able to receive your message.\n"
219#define OWL_DEFAULT_AAWAYMSG    "I'm sorry, but I am currently away from the terminal and am\nnot able to receive your message.\n"
220
221#define OWL_INCLUDE_REG_TESTS   1  /* whether to build in regression tests */
222
223#define OWL_CMD_ALIAS_SUMMARY_PREFIX "command alias to: "
224
225#define OWL_WEBZEPHYR_PRINCIPAL "daemon.webzephyr"
226#define OWL_WEBZEPHYR_CLASS     "webzephyr"
227#define OWL_WEBZEPHYR_OPCODE    "webzephyr"
228
229#define OWL_REGEX_QUOTECHARS    "+*.?[]^\\${}()"
230#define OWL_REGEX_QUOTEWITH     "\\"
231
232#if defined(HAVE_DES_STRING_TO_KEY) && defined(HAVE_DES_KEY_SCHED) && defined(HAVE_DES_ECB_ENCRYPT)
233#define OWL_ENABLE_ZCRYPT 1
234#endif
235
236#define OWL_META(key) ((key)|010000)
237/* OWL_CTRL is definied in kepress.c */
238
239#define LINE 2048
240
241typedef struct _owl_variable {
242  char *name;
243  int   type;  /* OWL_VARIABLE_* */
244  void *pval_default;  /* for types other and string */
245  int   ival_default;  /* for types int and bool     */
246  char *validsettings;          /* documentation of valid settings */
247  char *summary;                /* summary of usage */
248  char *description;            /* detailed description */
249  void *val;                    /* current value */
250  int  (*validate_fn)(struct _owl_variable *v, void *newval);
251                                /* returns 1 if newval is valid */
252  int  (*set_fn)(struct _owl_variable *v, void *newval); 
253                                /* sets the variable to a value
254                                 * of the appropriate type.
255                                 * unless documented, this
256                                 * should make a copy.
257                                 * returns 0 on success. */
258  int  (*set_fromstring_fn)(struct _owl_variable *v, char *newval);
259                                /* sets the variable to a value
260                                 * of the appropriate type.
261                                 * unless documented, this
262                                 * should make a copy.
263                                 * returns 0 on success. */
264  void *(*get_fn)(struct _owl_variable *v);
265                                /* returns a reference to the current value.
266                                 * WARNING:  this approach is hard to make
267                                 * thread-safe... */
268  int  (*get_tostring_fn)(struct _owl_variable *v, 
269                          char *buf, int bufsize, void *val); 
270                                /* converts val to a string
271                                 * and puts into buf */
272  void  (*free_fn)(struct _owl_variable *v);
273                                /* frees val as needed */
274} owl_variable;
275
276typedef struct _owl_input {
277  int ch;
278  gunichar uch;
279} owl_input;
280
281typedef struct _owl_fmtext {
282  int textlen;
283  int bufflen;
284  char *textbuff;
285  char default_attrs;
286  short default_fgcolor;
287  short default_bgcolor;
288} owl_fmtext;
289
290typedef struct _owl_list {
291  int size;
292  int avail;
293  void **list;
294} owl_list;
295
296typedef struct _owl_dict_el {
297  char *k;                      /* key   */
298  void *v;                      /* value */
299} owl_dict_el;
300
301typedef struct _owl_dict {
302  int size;
303  int avail;
304  owl_dict_el *els;             /* invariant: sorted by k */
305} owl_dict;
306typedef owl_dict owl_vardict;   /* dict of variables */
307typedef owl_dict owl_cmddict;   /* dict of commands */
308
309typedef struct _owl_context {
310  int   mode;
311  void *data;           /* determined by mode */
312} owl_context;
313
314typedef struct _owl_cmd {       /* command */
315  char *name;
316
317  char *summary;                /* one line summary of command */
318  char *usage;                  /* usage synopsis */
319  char *description;            /* long description of command */
320
321  int validctx;                 /* bitmask of valid contexts */
322
323  /* we should probably have a type here that says which of
324   * the following is valid, and maybe make the below into a union... */
325
326  /* Only one of these may be non-NULL ... */
327
328  char *cmd_aliased_to;         /* what this command is aliased to... */
329 
330  /* These don't take any context */
331  char *(*cmd_args_fn)(int argc, char **argv, char *buff); 
332                                /* takes argv and the full command as buff.
333                                 * caller must free return value if !NULL */
334  void (*cmd_v_fn)(void);       /* takes no args */
335  void (*cmd_i_fn)(int i);      /* takes an int as an arg */
336
337  /* The following also take the active context if it's valid */
338  char *(*cmd_ctxargs_fn)(void *ctx, int argc, char **argv, char *buff); 
339                                /* takes argv and the full command as buff.
340                                 * caller must free return value if !NULL */
341  void (*cmd_ctxv_fn)(void *ctx);               /* takes no args */
342  void (*cmd_ctxi_fn)(void *ctx, int i);        /* takes an int as an arg */
343  SV *cmd_perl;                                /* Perl closure that takes a list of args */
344} owl_cmd;
345
346
347typedef struct _owl_zwrite {
348  char *class;
349  char *inst;
350  char *realm;
351  char *opcode;
352  char *zsig;
353  char *message;
354  owl_list recips;
355  int cc;
356  int noping;
357} owl_zwrite;
358
359typedef struct _owl_pair {
360  void *key;
361  void *value;
362} owl_pair;
363
364struct _owl_fmtext_cache;
365
366typedef struct _owl_message {
367  int id;
368  int direction;
369#ifdef HAVE_LIBZEPHYR
370  ZNotice_t notice;
371#endif
372  struct _owl_fmtext_cache * fmtext;
373  int delete;
374  char *hostname;
375  owl_list attributes;            /* this is a list of pairs */
376  char *timestr;
377  time_t time;
378  char *zwriteline;
379} owl_message;
380
381#define OWL_FMTEXT_CACHE_SIZE 1000
382/* We cache the saved fmtexts for the last bunch of messages we
383   rendered */
384typedef struct _owl_fmtext_cache {
385    owl_message * message;
386    owl_fmtext fmtext;
387} owl_fmtext_cache;
388
389typedef struct _owl_style {
390  char *name;
391  char *description;
392  int type;
393  char *perlfuncname;
394  void (*formatfunc) (owl_fmtext *fm, owl_message *m);
395} owl_style;
396
397typedef struct _owl_mainwin {
398  int curtruncated;
399  int lasttruncated;
400  int lastdisplayed;
401} owl_mainwin;
402
403typedef struct _owl_viewwin {
404  owl_fmtext fmtext;
405  int textlines;
406  int topline;
407  int rightshift;
408  int winlines, wincols;
409  WINDOW *curswin;
410  void (*onclose_hook) (struct _owl_viewwin *vwin, void *data);
411  void *onclose_hook_data;
412} owl_viewwin;
413 
414typedef struct _owl_popwin {
415  WINDOW *borderwin;
416  WINDOW *popwin;
417  int lines;
418  int cols;
419  int active;
420  int needsfirstrefresh;
421  void (*handler) (int ch);
422} owl_popwin;
423
424typedef struct _owl_popexec {
425  int refcount;
426  owl_viewwin *vwin;
427  int winactive;
428  int pid;                      /* or 0 if it has terminated */
429  int rfd; 
430} owl_popexec;
431
432typedef struct _owl_messagelist {
433  owl_list list;
434} owl_messagelist;
435
436typedef struct _owl_regex {
437  int negate;
438  char *string;
439  regex_t re;
440} owl_regex;
441
442typedef struct _owl_filterelement {
443  int (*match_message)(struct _owl_filterelement *fe, owl_message *m);
444  /* Append a string representation of the filterelement onto buf*/
445  void (*print_elt)(struct _owl_filterelement *fe, char * buf);
446  /* Operands for and,or,not*/
447  struct _owl_filterelement *left, *right;
448  /* For regex filters*/
449  owl_regex re;
450  /* Used by regexes, filter references, and perl */
451  char *field;
452} owl_filterelement;
453
454typedef struct _owl_filter {
455  char *name;
456  int polarity;
457  owl_filterelement * root;
458  int fgcolor;
459  int bgcolor;
460  int cachedmsgid;  /* cached msgid: should move into view eventually */
461} owl_filter;
462
463typedef struct _owl_view {
464  char *name;
465  owl_filter *filter;
466  owl_messagelist ml;
467  owl_style *style;
468} owl_view;
469
470typedef struct _owl_history {
471  owl_list hist;
472  int cur;
473  int touched;
474  int partial;
475  int repeats;
476} owl_history;
477
478typedef struct _owl_editwin {
479  char *buff;
480  owl_history *hist;
481  int bufflen;
482  int allocated;
483  int buffx, buffy;
484  int topline;
485  int winlines, wincols, fillcol, wrapcol;
486  WINDOW *curswin;
487  int style;
488  int lock;
489  int dotsend;
490  int echochar;
491
492  char *command;
493  void (*callback)(struct _owl_editwin*);
494  void *cbdata;
495} owl_editwin;
496
497typedef struct _owl_mux {
498  int handle;                   /* for referencing this */
499  int active;                   /* has this been deleted? */
500  int fd;                     
501  int eventmask;                /* bitmask of OWL_MUX_* */
502  void (*handler_fn)(int handle, int fd, int eventmask, void *data);
503  void *data;                   /* data reference to pass to callback */
504} owl_mux;
505typedef owl_list owl_muxevents;
506
507typedef struct _owl_keybinding {
508  int  *j;                      /* keypress stack (0-terminated) */ 
509  int   type;                   /* command or function? */
510  char *desc;                   /* description (or "*user*") */
511  char *command;                /* command, if of type command */
512  void (*function_fn)(void);    /* function ptr, if of type function */
513} owl_keybinding;
514
515typedef struct _owl_keymap {
516  char     *name;               /* name of keymap */
517  char     *desc;               /* description */
518  owl_list  bindings;           /* key bindings */
519  struct _owl_keymap *submap;   /* submap */
520  void (*default_fn)(owl_input j);      /* default action (takes a keypress) */
521  void (*prealways_fn)(owl_input  j);   /* always called before a keypress is received */
522  void (*postalways_fn)(owl_input  j);  /* always called after keypress is processed */
523} owl_keymap;
524
525typedef struct _owl_keyhandler {
526  owl_dict  keymaps;            /* dictionary of keymaps */
527  owl_keymap *active;           /* currently active keymap */
528  int       in_esc;             /* escape pressed? */
529  int       kpstack[OWL_KEYMAP_MAXSTACK+1]; /* current stack of keypresses */
530  int       kpstackpos;         /* location in stack (-1 = none) */
531} owl_keyhandler;
532
533typedef struct _owl_buddy {
534  int proto;
535  char *name;
536  int isidle;
537  int idlesince;
538} owl_buddy;
539
540typedef struct _owl_buddylist {
541  owl_list buddies;
542} owl_buddylist;
543
544typedef struct _owl_zbuddylist {
545  owl_list zusers;
546} owl_zbuddylist;
547
548typedef struct _owl_timer {
549  int direction;
550  time_t starttime;
551  int start;
552} owl_timer;
553
554typedef struct _owl_errqueue {
555  owl_list errlist;
556} owl_errqueue;
557
558typedef struct _owl_colorpair_mgr {
559  int next;
560  short **pairs;
561} owl_colorpair_mgr;
562
563typedef struct _owl_obarray {
564  owl_list strings;
565} owl_obarray;
566
567typedef struct _owl_global {
568  owl_mainwin mw;
569  owl_popwin pw;
570  owl_history cmdhist;          /* command history */
571  owl_history msghist;          /* outgoing message history */
572  owl_keyhandler kh;
573  owl_list filterlist;
574  owl_list puntlist;
575  owl_muxevents muxevents;      /* fds to dispatch on */
576  owl_vardict vars;
577  owl_cmddict cmds;
578  owl_context ctx;
579  owl_errqueue errqueue;
580  int lines, cols;
581  int curmsg, topmsg;
582  int curmsg_vert_offset;
583  owl_view current_view;
584  owl_messagelist msglist;
585  WINDOW *recwin, *sepwin, *msgwin, *typwin;
586  int needrefresh;
587  int rightshift;
588  int resizepending;
589  int recwinlines;
590  int typwinactive;
591  char *thishost;
592  char *homedir;
593  char *confdir;
594  char *startupfile;
595  int direction;
596  int zaway;
597  char *cur_zaway_msg;
598  int haveconfig;
599  int config_format;
600  void *buffercbdata;
601  owl_editwin tw;
602  owl_viewwin vw;
603  void *perl;
604  int debug;
605  time_t starttime;
606  time_t lastinputtime;
607  char *startupargs;
608  int userclue;
609  int nextmsgid;
610  int hascolors;
611  int colorpairs;
612  owl_colorpair_mgr cpmgr;
613  int searchactive;
614  int newmsgproc_pid;
615  int malloced, freed;
616  char *searchstring;
617  aim_session_t aimsess;
618  aim_conn_t bosconn;
619  owl_timer aim_noop_timer;
620  owl_timer aim_ignorelogin_timer;
621  owl_timer aim_buddyinfo_timer;
622  int aim_loggedin;         /* true if currently logged into AIM */
623  int aim_doprocessing;     /* true if we should process AIM events (like pending login) */
624  char *aim_screenname;     /* currently logged in AIM screen name */
625  owl_buddylist buddylist;  /* list of logged in AIM buddies */
626  owl_list messagequeue;    /* for queueing up aim and other messages */
627  owl_dict styledict;       /* global dictionary of available styles */
628  char *response;           /* response to the last question asked */
629  int havezephyr;
630  int haveaim;
631  int got_err_signal;       /* 1 if we got an unexpected signal */
632  siginfo_t err_signal_info;
633  owl_zbuddylist zbuddies;
634  owl_timer zephyr_buddycheck_timer;
635  struct termios startup_tio;
636  owl_obarray obarray;
637} owl_global;
638
639/* globals */
640extern owl_global g;
641
642#include "owl_prototypes.h"
643
644/* these are missing from the zephyr includes for some reason */
645#ifdef HAVE_LIBZEPHYR
646int ZGetSubscriptions(ZSubscription_t *, int *);
647int ZGetLocations(ZLocations_t *,int *);
648#endif
649
650#endif /* INC_OWL_H */
Note: See TracBrowser for help on using the repository browser.