]> git.itanic.dy.fi Git - maemo-mapper/blob - src/aprs_message.h
Added basic APRS support - Can be disabled by removing definition of INCLUDE_APRS
[maemo-mapper] / src / aprs_message.h
1 /*
2  * 
3  * This file is part of Maemo Mapper.
4  *
5  * Maemo Mapper is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * Maemo Mapper is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with Maemo Mapper.  If not, see <http://www.gnu.org/licenses/>.
17  * 
18  * 
19  * Parts of this code have been ported from Xastir by Rob Williams (10 Aug 2008):
20  * 
21  *  * XASTIR, Amateur Station Tracking and Information Reporting
22  * Copyright (C) 1999,2000  Frank Giannandrea
23  * Copyright (C) 2000-2007  The Xastir Group
24  * 
25  */
26
27
28
29 #ifdef HAVE_CONFIG_H
30 #    include "config.h"
31 #endif
32
33 #ifdef INCLUDE_APRS
34
35 #ifndef MAEMO_MAPPER_APRS_MESSAGE
36 #define MAEMO_MAPPER_APRS_MESSAGE
37
38 #define MSG_INCREMENT 200
39
40 #include "types.h"
41
42
43 // Used for messages and bulletins
44 typedef struct {
45     char active;
46     TAprsPort port;
47     char type;
48     char heard_via_tnc;
49     time_t sec_heard;
50     time_t last_ack_sent;
51     char packet_time[MAX_TIME];
52     char call_sign[MAX_CALLSIGN+1];
53     char from_call_sign[MAX_CALLSIGN+1];
54     char message_line[MAX_MESSAGE_LENGTH+1];
55     char seq[MAX_MESSAGE_ORDER+1];
56     char acked;
57     char position_known;
58     time_t interval;
59     int tries;
60 } Message;
61
62
63
64 // Struct used to create linked list of most recent ack's
65 typedef struct _ack_record {
66     char callsign[MAX_CALLSIGN+1];
67     char ack[5+1];
68     struct _ack_record *next;
69 } ack_record;
70
71
72
73
74 int decode_message(gchar *call,gchar *path,gchar *message,gint port,gint third_party);
75
76
77 extern Message *msg_data;
78 extern long msg_index_end;
79 extern long *msg_index;
80 #endif
81
82 #endif //INCLUDE_APRS