home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pp / pp-6.0 / Src / MTAconsole / console.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-18  |  4.7 KB  |  265 lines

  1. /* console.h: include file for MTA console */
  2.  
  3. /*
  4.  * @(#) $Header: /xtel/pp/pp-beta/Src/MTAconsole/RCS/console.h,v 6.0 1991/12/18 20:26:48 jpo Rel $
  5.  *
  6.  * $Log: console.h,v $
  7.  * Revision 6.0  1991/12/18  20:26:48  jpo
  8.  * Release 6.0
  9.  *
  10.  *
  11.  */
  12.  
  13.  
  14.  
  15. #ifndef _H_MTACONSOLE_CONSOLE
  16. #define _H_MTACONSOLE_CONSOLE
  17.  
  18.  
  19. #include           "util.h"
  20. #include    <isode/cmd_srch.h>
  21. #include     "Qmgr-types.h"
  22. #include    <X11/Intrinsic.h>
  23.  
  24. #include    <X11/StringDefs.h>
  25. #include    <X11/Shell.h>
  26.  
  27. #include    <X11/Xaw/Form.h>
  28. #include    <X11/Xaw/Command.h>
  29. #include    <X11/Xaw/Viewport.h>
  30. #include    <X11/Xaw/Box.h>
  31. #include    <X11/Xaw/Label.h>
  32. #include    <X11/Xaw/List.h>
  33. #include    <X11/Xaw/Text.h>
  34. #include    <X11/Xaw/AsciiText.h>
  35. #include    <X11/Xaw/Paned.h>
  36. #include    <X11/Xaw/StripChart.h>
  37.  
  38. typedef    struct procStatus {
  39.     char    enabled;    /* boolean TRUE or FALSE */
  40.     time_t    lastAttempt,
  41.         cachedUntil,
  42.         lastSuccess;
  43. } ProcStatus;
  44.  
  45.  
  46. typedef struct tailor {
  47.     char    *key;
  48.     double    ub_number,
  49.         ub_volume,
  50.         ub_age,
  51.         ub_last;
  52.     struct tailor *next;
  53. } TailorInfo;
  54.  
  55.  
  56.  
  57. /* 4 factors (num, vol, age, last) == max 400 % */
  58. #define max_bad_channel        400
  59.  
  60. /* 4 factors (num, vol, age, last) == max 400 % */
  61. #define max_bad_mta        400
  62.  
  63. /* 2 factors (vol, age) == max 200 % */
  64. #define max_bad_msg        200
  65.         
  66.  
  67.  
  68. typedef struct permsginfo {
  69.     char            *queueid;
  70.     char            *originator;
  71.     char            *contenttype;
  72.     char            *eit;
  73.     int            priority;
  74.     int            size;
  75.     time_t            expiryTime;
  76.     time_t            deferredTime;
  77.     time_t            age;
  78.     int            errorCount;
  79.     char            *inChannel;
  80.     char            *uaContentId;
  81. } Permsginfo;
  82.  
  83.  
  84.  
  85. typedef     struct recip {
  86.     int            id;
  87.     char            *recipient;
  88.     char            *mta;
  89.     char            *actChan;
  90.     char            *chansOutstanding;
  91.     struct procStatus    *status;
  92.     char            *info;
  93.     struct recip         *next;
  94. } Recip;
  95.  
  96.  
  97.  
  98. typedef struct msg_struct {
  99.     struct permsginfo     *msginfo;
  100.     struct recip        *reciplist;
  101.     struct tailor        *tai;
  102. } Msg_struct;
  103.  
  104.  
  105.  
  106. typedef struct mta_struct {
  107.     char            *mta;
  108.     time_t            oldestMessage;
  109.     int            numberMessages,
  110.                 numberReports,
  111.                 volumeMessages;
  112.     struct procStatus    *status;
  113.     int            priority;
  114.     char            active;
  115.     char            *info;
  116.     struct tailor        *tai;
  117. } Mta_struct;
  118.  
  119.  
  120.  
  121. typedef struct chan_struct {
  122.     char            *channelname,
  123.                 *channeldescrip;
  124.     time_t            oldestMessage;
  125.     int            numberMessages,
  126.                 deltaMessages,
  127.                 numberReports,
  128.                 deltaReports,
  129.                 deltaVolume,
  130.                  volumeMessages,
  131.                 numberActiveProcesses;
  132.     struct procStatus    *status;
  133.     int            priority;
  134.     struct mta_struct    **mtalist;
  135.     int            num_mtas;
  136.     int            given_num_mtas;
  137.     int            deltaMtas;
  138.     int            display_num;
  139.     int            inbound;
  140.     int            outbound;
  141.     int            chantype;
  142.     int            maxprocs;
  143.     struct tailor        *tai;
  144. } Chan_struct;
  145.  
  146.  
  147. typedef struct mta_disp_struct {
  148.     Widget            widget;
  149.     struct mta_struct     *mta;
  150. } Mta_disp_struct;
  151.  
  152.  
  153.  
  154. typedef struct msg_disp_struct {
  155.     Widget            widget;
  156.     struct msg_struct     *msg;
  157. } Msg_disp_struct;
  158.  
  159.  
  160.  
  161. typedef struct monitor_item {
  162.     Widget            form,
  163.                 chan,
  164.                 box;
  165.     Mta_disp_struct        **mtas;
  166.     int            num_allocd; /* num allocd for mtas */
  167.     int            num_mtas;  /* num of mtas actual being displayed */
  168.     struct chan_struct    **channel; /* actual  being displayed */
  169. } Monitor_item;
  170.  
  171.  
  172.  
  173. typedef struct color_item {
  174.     int            badness;
  175.     XColor          colour;
  176. } Color_item;
  177.  
  178.  
  179.  
  180. typedef enum { 
  181.         unknown, 
  182.         quit, connect, disconnect, quecontrol, qmgrStatus,
  183.         chanread, chanstop, chanstart, 
  184.         chancacheadd, chandownforce, chanclear, chaninfo,
  185.         channext, chanprev,
  186.         mtaread, mtastop, mtastart, 
  187.         mtacacheadd, mtaforce, mtadownforce, mtaclear, mtainfo,
  188.         mtanext, mtaprev,
  189.         readchannelmtamessage, msgstop, msgstart, 
  190.         msgcacheadd, msgforce, msgclear, msginfo,
  191.         msgnext, msgprev,
  192.         mtacontrol
  193. } Operations;
  194.  
  195.  
  196.  
  197. typedef struct popup_tuple {
  198.     Widget            label,
  199.                 text;
  200. } Popup_tuple;
  201.  
  202.  
  203.  
  204. typedef struct popup_menu {
  205.     Widget            popup,
  206.                 form;
  207.     int            numberOftuples,
  208.                 selected;
  209.     Operations        op;
  210.     Popup_tuple        *tuple;
  211. } Popup_menu;
  212.  
  213.  
  214.  
  215. /* -- defines for config --- */
  216. #define REFRESH            0
  217. #define INACTIVE        1
  218. #define START            2
  219. #define BACKOFF            3
  220. #define CONNECTMAX        4
  221. #define PERCENT            5
  222. #define MINBADMTA        6
  223. #define LINEMAX            7
  224.  
  225.  
  226. typedef enum            { percentage, line, all, chanonly } Heuristic;
  227. typedef enum            { notconnected, connecting, connected} State;
  228. typedef enum            { limited, full} Authentication;
  229. typedef enum            { inactive, green, yellow, red} Colour;
  230. typedef enum            { control, monitor} Mode;
  231.  
  232.  
  233. #define APPLICATION_CLASS    "Mtaconsole"
  234. #define    MAX_EDIT_STRING        100
  235. #define    NO_CONNECTION        "Unconnected"
  236.  
  237.  
  238.  
  239. typedef struct server_dispatch {
  240.     char            *ds_name;
  241.     int            ds_operation;
  242.     IFP            ds_vector;
  243. } Server_dispatch;
  244.  
  245.  
  246.  
  247. typedef struct client_dispatch {
  248.     char            *ds_name;
  249.     int                ds_operation;
  250.     IFP                ds_argument;
  251.     modtyp            *ds_fr_mod;
  252.     int                ds_fr_index;
  253.     IFP                ds_result;
  254.     IFP                ds_error;
  255.     char            *ds_help;
  256. } Client_dispatch;
  257.  
  258.  
  259. #define    PERCENT_BASED        "percent based"
  260. #define LINE_BASED        "line based"
  261. #define ALL_BASED        "all"
  262. #define CHANONLY_BASED        "channel only"
  263.  
  264. #endif
  265.