File: fdapxread.h

package info (click to toggle)
turqstat 1.2-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 212 kB
  • ctags: 463
  • sloc: cpp: 2,637; makefile: 68
file content (93 lines) | stat: -rw-r--r-- 2,446 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// Copyright (c) 1999 Peter Karlsson
//
// $Id: fdapxread.h,v 1.5 1999/07/16 00:07:27 peter Exp $
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

#ifndef __FDAPXREAD_H
#define __FDAPXREAD_H

#include <string>

#include "arearead.h"
#include "statengine.h"
#include "datatypes.h"

#if defined(__GNUC__) || defined(__EMX__)
# pragma pack(1)
#endif

class FdApxRead : public AreaRead
{
public:
    // Constructor and destructor
    FdApxRead(const char *path, unsigned areanum);
    virtual ~FdApxRead();

    // Transfer function
    virtual bool Transfer(time_t starttime, StatEngine &destination);

protected:
    char        *areapath;
    unsigned    areanumber;

    struct addr_s
    {
        UINT16  zone, net, node, point;
    };

    struct msghdrapx_s /* MSGHDR.APX */
    {
        char    recipientname[36];
        char    sendername[36];
        char    subject[72];
        UINT32  msgidcrc;
        UINT32  replycrc;
        UINT16  replyto;
        UINT16  replynext;
        UINT16  reply1st;
        UINT32  timewritten;
        UINT32  timesentrcvd;
        addr_s  recipientaddress;
        addr_s  senderaddress;
        UINT32  statusflags;
        UINT32  txtpos;
        UINT16  txtsize;
        UINT16  foldernumber;
        UINT16  foldernumberreplyto;
        UINT16  foldernumberreplynext;
        UINT16  foldernumberreply1st;
    };

    static const UINT32 Fdapx_local   = 0x01;
    static const UINT32 Fdaxx_sent    = 0x10;
    static const UINT32 Fdapx_deleted = 0x80000000;

    struct msgstatapx_s /* MSGSTAT.APX */
    {
        UINT16  msgbaseversion;
        UINT8   reserved[254];
        UINT16  totalmsgs[2000];
        UINT16  highestmsg[2000];
        UINT16  lastreadptrs[2000];
    };

    static const UINT32 Fdapx_msgbaseversion = 3;
};

#if defined(__GNUC__) || defined(__EMX__)
# pragma pack()
#endif

#endif