2 * Copyright (C) Volition, Inc. 2005. All rights reserved.
4 * All source code herein is the property of Volition, Inc. You may not sell
5 * or otherwise commercially exploit the source or things you created based on the
11 * $Logfile: /Freespace2/code/Network/multi_fstracker.h $
13 * $Date: 8/25/99 4:38p $
16 * $Log: /Freespace2/code/Network/multi_fstracker.h $
18 * 8 8/25/99 4:38p Dave
19 * Updated PXO stuff. Make squad war report stuff much more nicely.
21 * 7 6/07/99 9:51p Dave
22 * Consolidated all multiplayer ports into one.
24 * 6 2/17/99 2:11p Dave
25 * First full run of squad war. All freespace and tracker side stuff
28 * 5 2/12/99 6:16p Dave
29 * Pre-mission Squad War code is 95% done.
31 * 4 2/11/99 3:08p Dave
32 * PXO refresh button. Very preliminary squad war support.
34 * 3 2/03/99 6:06p Dave
35 * Groundwork for FS2 PXO usertracker support. Gametracker support next.
37 * 2 10/07/98 10:53a Dave
40 * 1 10/07/98 10:50a Dave
42 * 12 9/04/98 3:51p Dave
43 * Put in validated mission updating and application during stats
46 * 11 5/21/98 9:45p Dave
47 * Lengthened tracker polling times. Put in initial support for PXO
48 * servers with channel filters. Fixed several small UI bugs.
50 * 10 5/18/98 9:15p Dave
51 * Put in network config file support.
53 * 9 5/15/98 9:52p Dave
54 * Added new stats for freespace. Put in artwork for viewing stats on PXO.
56 * 8 5/05/98 2:10p Dave
57 * Verify campaign support for testing. More new tracker code.
59 * 7 4/29/98 12:11a Dave
60 * Put in first rev of full API support for new master tracker.
62 * 6 4/28/98 7:50p Dave
63 * Fixing a broken makefile.
65 * 5 4/28/98 5:10p Dave
66 * Fixed multi_quit_game() client side sequencing problem. Turn off
67 * afterburners when ending multiplayer mission. Begin integration of mt
68 * API from Kevin Bentley.
70 * 4 2/02/98 8:44p Dave
71 * Finished redoing master tracker stats transfer.
73 * 3 1/31/98 4:32p Dave
74 * Put in new support for VMT player validation, game logging in, and game
75 * logging out. Need to finish stats transfer.
77 * 2 1/30/98 5:53p Dave
78 * Revamped master tracker API
80 * 1 1/30/98 5:50p Dave
84 #ifndef _FREESPACE_SPECIFIC_MASTER_TRACKER_HEADER
85 #define _FREESPACE_SPECIFIC_MASTER_TRACKER_HEADER
87 // -----------------------------------------------------------------------------------
88 // FREESPACE MASTER TRACKER DEFINES/VARS
91 // tracker mission validation status
92 #define MVALID_STATUS_UNKNOWN -1
93 #define MVALID_STATUS_VALID 0
94 #define MVALID_STATUS_INVALID 1
96 // tracker squad war validation status
97 #define MSW_STATUS_UNKNOWN -1
98 #define MSW_STATUS_VALID 0
99 #define MSW_STATUS_INVALID 1
101 //struct vmt_freespace2_struct;
102 struct scoring_struct;
103 struct squad_war_request;
104 struct squad_war_result;
106 // channel to associate when creating a server
107 extern char Multi_fs_tracker_channel[255];
109 // channel to use when polling the tracker for games
110 extern char Multi_fs_tracker_filter[255];
112 // -----------------------------------------------------------------------------------
113 // FREESPACE MASTER TRACKER DECLARATIONS
116 // give some processor time to the tracker API
117 void multi_fs_tracker_process();
119 // initialize the master tracker API for Freespace
120 void multi_fs_tracker_init();
122 // validate the current player with the master tracker (will create the pilot on the MT if necessary)
123 int multi_fs_tracker_validate(int show_error);
125 // attempt to log the current game server in with the master tracker
126 void multi_fs_tracker_login_freespace();
128 // attempt to update all player statistics and scores on the tracker
129 int multi_fs_tracker_store_stats();
131 // attempt to update all player statistics (standalone mode)
132 int multi_fs_std_tracker_store_stats();
134 // log freespace out of the tracker
135 void multi_fs_tracker_logout();
137 // send a request for a list of games
138 void multi_fs_tracker_send_game_request();
140 // if the API has successfully been initialized and is running
141 int multi_fs_tracker_inited();
143 // update our settings on the tracker regarding the current netgame stuff
144 void multi_fs_tracker_update_game(netgame_info *ng);
146 // if we're currently busy performing some tracker operation (ie, you should wait or not)
147 int multi_fs_tracker_busy();
149 // copy a freespace stats struct to a tracker-freespace stats struct
150 void multi_stats_fs_to_tracker(scoring_struct *fs, vmt_stats_struct *vmt, player *pl, int tracker_id);
152 // copy a tracker-freespace stats struct to a freespace stats struct
153 void multi_stats_tracker_to_fs(vmt_stats_struct *vmt, scoring_struct *fs);
155 // return an MVALID_STATUS_* value, or -2 if the user has "cancelled"
156 int multi_fs_tracker_validate_mission(char *filename);
158 // return an MSW_STATUS_* value
159 int multi_fs_tracker_validate_sw(squad_war_request *sw_req, char *bad_reply, const int max_reply_len);
161 // store the results of a squad war mission on PXO, return 1 on success
162 int multi_fs_tracker_store_sw(squad_war_result *sw_res, char *bad_reply, const int max_reply_len);