Galactic Bloodshed
csp.h
Go to the documentation of this file.
1 // Copyright 2014 The Galactic Bloodshed Authors. All rights reserved.
2 // Use of this source code is governed by a license that can be
3 // found in the COPYING file.
4 
5 /* csp.h: Contains the defines for all the Client-Server Protocol (CSP)
6  numbers. */
7 
8 #ifndef CSP_H
9 #define CSP_H
10 
11 /*---- Server responses ----*/
12 
13 /* VERSION */
14 #define CSP_VERSION_INFO 10 /* version XX */
15 #define CSP_VERSION_OPTIONS 11 /* options set YY */
16 
17 /* LOGIN */
18 #define CSP_CLIENT_ON 30 /* client mode on */
19 #define CSP_CLIENT_OFF 31 /* client mode off */
20 #define CSP_KNOWLEDGE 32
21 
22 /* INFO */
23 #define CSP_SCOPE_PROMPT 40
24 
25 /* UPDATE/SEGMENT/RESET */
26 #define CSP_UPDATE_START 50 /* update started */
27 #define CSP_UPDATE_END 51 /* update finshed */
28 #define CSP_SEGMENT_START 52 /* segment started */
29 #define CSP_SEGMENT_END 53 /* segment finished */
30 #define CSP_RESET_START 54 /* reset started */
31 #define CSP_RESET_END 55 /* reset finished */
32 #define CSP_BACKUP_START 56 /* backup started */
33 #define CSP_BACKUP_END 57 /* backup finished */
34 
35 #define CSP_UPDATES_SUSPENDED 58 /* updates suspended */
36 #define CSP_UPDATES_RESUMED 59 /* updates resumed */
37 
38 /* SURVEY */
39 #define CSP_SURVEY_INTRO 101 /* planet info */
40 #define CSP_SURVEY_SECTOR 102 /* sector info */
41 #define CSP_SURVEY_END 103 /* end of command(EOC) */
42 
43 /* RELATION */
44 #define CSP_RELATION_INTRO 201 /* race # & name */
45 #define CSP_RELATION_DATA 202 /* the data */
46 #define CSP_RELATION_END 203 /* end of command(EOC) */
47 
48 /* PROFILE */
49 /* DYNAMIC = Active Knowledge Capital Morale Gun GTele STele */
50 /* DYNAMIC_OTHER = %Know Morale Gun GTele OTele SecPref */
51 #define CSP_PROFILE_INTRO 301 /* header */
52 #define CSP_PROFILE_PERSONAL 302
53 #define CSP_PROFILE_DYNAMIC 303
54 #define CSP_PROFILE_DYNAMIC_OTHER 304
55 #define CSP_PROFILE_RACE_STATS 305
56 #define CSP_PROFILE_RACE_STATS_OTHER 306
57 #define CSP_PROFILE_PLANET 307
58 #define CSP_PROFILE_SECTOR 308
59 #define CSP_PROFILE_DISCOVERY 309 /* discoveries */
60 #define CSP_PROFILE_END 310
61 
62 /* WHO */
63 #define CSP_WHO_INTRO 401 /* header */
64 #define CSP_WHO_DATA 402 /* actual data */
65 #define CSP_WHO_COWARDS 403 /* send either # of cowards */
66 #define CSP_WHO_END 403 /* or WHO_END as terminator */
67 
68 /* EXPLORE */
69 /* STAR_DATA = # Name Ex Inhab Auto Slaved Toxic Compat #Sec Depo Xtal Type */
70 #define CSP_EXPLORE_INTRO 501
71 #define CSP_EXPLORE_STAR 502
72 #define CSP_EXPLORE_STAR_ALIENS 503
73 #define CSP_EXPLORE_STAR_DATA 504
74 #define CSP_EXPLORE_STAR_END 505
75 #define CSP_EXPLORE_END 506
76 
77 /* MAP */
78 /* DYNAMIC_1 = Type Sects Guns MobPoints Res Des Fuel Xtals */
79 /* DYNAMIC_2 = Mob AMob Compat Pop ^Pop ^TPop Mil Tax ATax Deposits Est Prod */
80 #define CSP_MAP_INTRO 601
81 #define CSP_MAP_DYNAMIC_1 602
82 #define CSP_MAP_DYNAMIC_2 603
83 #define CSP_MAP_ALIENS 604
84 #define CSP_MAP_DATA 605
85 #define CSP_MAP_END 606
86 
87 /* CLIENT GENERATED COMMANDED */
88 #define CSP_LOGIN_COMMAND 1101 /* login command */
89 #define CSP_VERSION_COMMAND 1102 /* version command */
90 #define CSP_SURVEY_COMMAND 1103 /* imap command */
91 #define CSP_RELATION_COMMAND 1104 /* relation command */
92 #define CSP_PROFILE_COMMAND 1105 /* profile command */
93 #define CSP_WHO_COMMAND 1106 /* who command */
94 #define CSP_EXPLORE_COMMAND 1107 /* exploration command */
95 #define CSP_MAP_COMMAND 1108 /* map command */
96 #define CSP_SCOPE_COMMAND 1110 /* request a prompt */
97 
98 /* Dan Dickey for XGB ** NOT SUPPORTED FULLY ** */
99 
100 #define CSP_ORBIT_COMMAND 1501 /* orbit command */
101 #define CSP_ZOOM_COMMAND 1502 /* zoom command */
102 #define CSP_PLANDUMP_COMMAND 1503 /* planet dump command */
103 #define CSP_SHIPDUMP_COMMAND 1504 /* ship dump command */
104 
105 /* Planet Dumps */
106 #define CSP_PLANDUMP_INTRO 2000 /* planet name */
107 #define CSP_PLANDUMP_CONDITIONS 2001 /* conditions */
108 #define CSP_PLANDUMP_STOCK 2002 /* stockpiles */
109 #define CSP_PLANDUMP_PROD 2003 /* production last update */
110 #define CSP_PLANDUMP_MISC 2004 /* rest of stuff */
111 #define CSP_PLANDUMP_NOEXPL 2005 /* planet not explored */
112 
113 /* General usage */
114 #define CSP_STAR_UNEXPL 2010 /* star is not explored */
115 /* ORBIT */
116 #define CSP_ORBIT_OUTPUT_INTRO 2020 /* orbit parameters */
117 #define CSP_ORBIT_STAR_DATA 2021 /* star info */
118 #define CSP_ORBIT_UNEXP_PL_DATA 2022 /* unexplored planet info */
119 #define CSP_ORBIT_EXP_PL_DATA 2023 /* explored planet info */
120 #define CSP_ORBIT_SHIP_DATA 2024 /* ship info */
121 #define CSP_ORBIT_OUTPUT_END 2025 /* end of command(EOC) */
122 
123 /* Ship Dumps */
124 #define CSP_SHIPDUMP_GEN 2030 /* General information */
125 #define CSP_SHIPDUMP_STOCK 2031 /* Stock information */
126 #define CSP_SHIPDUMP_STATUS 2032 /* Status information */
127 #define CSP_SHIPDUMP_WEAPONS 2033 /* Weapons information */
128 #define CSP_SHIPDUMP_FACTORY 2034 /* Factory information */
129 #define CSP_SHIPDUMP_DEST 2035 /* Destination information */
130 #define CSP_SHIPDUMP_PTACT_GEN 2036 /* General planet tactical */
131 #define CSP_SHIPDUMP_PTACT_PDIST 2037 /* distance between planet's */
132 #define CSP_SHIPDUMP_STACT_PDIST 2038 /* distance between a ship a*/
133 #define CSP_SHIPDUMP_PTACT_INFO 2039 /* for a ship from a planet */
134 #define CSP_SHIPDUMP_STACT_INFO 2040 /* ifor a ship from a ship */
135 #define CSP_SHIPDUMP_ORDERS 2041 /* Ship orders */
136 #define CSP_SHIPDUMP_THRESH 2042 /* Ship threshloading */
137 #define CSP_SHIPDUMP_SPECIAL 2043 /* Ship specials */
138 #define CSP_SHIPDUMP_HYPER 2044 /* Hyper drive usage */
139 #define CSP_SHIPDUMP_END 2055 /* end of command (EOC) */
140 
141 /* Dan Dickey for XGB ** NOT SUPPORTED FULLY ** */
142 
143 /*---- Error Responses ----*/
144 #define CSP_ERR 9900 /* error */
145 #define CSP_ERR_TOO_MANY_ARGS 9901 /* too many args */
146 #define CSP_ERR_TOO_FEW_ARGS 9902 /* too few args */
147 #define CSP_ERR_UNKNOWN_COMMAND 9903 /* unknown command */
148 #define CSP_ERR_NOSUCH_PLAYER 9904 /* no such player */
149 #define CSP_ERR_NOSUCH_PLACE 9905 /* no such place - scope err */
150 
151 #define CSP_MAX_SERVER_COMMAND 2000
152 
153 #define CSP_ZOOM 35
154 
155 #endif // CSP_H