]> icculus.org git repositories - taylor/freespace2.git/blob - include/multi_fstracker.h
fix issue with looping audio streams
[taylor/freespace2.git] / include / multi_fstracker.h
1 /*
2  * Copyright (C) Volition, Inc. 2005.  All rights reserved.
3  * 
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 
6  * source.
7  *
8 */
9
10 /*
11  * $Logfile: /Freespace2/code/Network/multi_fstracker.h $
12  * $Revision: 8 $
13  * $Date: 8/25/99 4:38p $
14  * $Author: Dave $
15  *
16  * $Log: /Freespace2/code/Network/multi_fstracker.h $
17  * 
18  * 8     8/25/99 4:38p Dave
19  * Updated PXO stuff. Make squad war report stuff much more nicely.
20  * 
21  * 7     6/07/99 9:51p Dave
22  * Consolidated all multiplayer ports into one.
23  * 
24  * 6     2/17/99 2:11p Dave
25  * First full run of squad war. All freespace and tracker side stuff
26  * works.
27  * 
28  * 5     2/12/99 6:16p Dave
29  * Pre-mission Squad War code is 95% done.
30  * 
31  * 4     2/11/99 3:08p Dave
32  * PXO refresh button. Very preliminary squad war support.
33  * 
34  * 3     2/03/99 6:06p Dave
35  * Groundwork for FS2 PXO usertracker support.  Gametracker support next.
36  * 
37  * 2     10/07/98 10:53a Dave
38  * Initial checkin.
39  * 
40  * 1     10/07/98 10:50a Dave
41  * 
42  * 12    9/04/98 3:51p Dave
43  * Put in validated mission updating and application during stats
44  * updating.
45  * 
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.
49  * 
50  * 10    5/18/98 9:15p Dave
51  * Put in network config file support.
52  * 
53  * 9     5/15/98 9:52p Dave
54  * Added new stats for freespace. Put in artwork for viewing stats on PXO.
55  * 
56  * 8     5/05/98 2:10p Dave
57  * Verify campaign support for testing. More new tracker code.
58  * 
59  * 7     4/29/98 12:11a Dave
60  * Put in first rev of full API support for new master tracker.
61  * 
62  * 6     4/28/98 7:50p Dave
63  * Fixing a broken makefile.
64  * 
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.
69  * 
70  * 4     2/02/98 8:44p Dave
71  * Finished redoing master tracker stats transfer.
72  * 
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.
76  * 
77  * 2     1/30/98 5:53p Dave
78  * Revamped master tracker API
79  * 
80  * 1     1/30/98 5:50p Dave
81  * 
82  * $NoKeywords: $
83  */
84 #ifndef _FREESPACE_SPECIFIC_MASTER_TRACKER_HEADER
85 #define _FREESPACE_SPECIFIC_MASTER_TRACKER_HEADER
86
87 // -----------------------------------------------------------------------------------
88 // FREESPACE MASTER TRACKER DEFINES/VARS
89 //
90
91 // tracker mission validation status
92 #define MVALID_STATUS_UNKNOWN                                   -1
93 #define MVALID_STATUS_VALID                                     0
94 #define MVALID_STATUS_INVALID                                   1
95
96 // tracker squad war validation status
97 #define MSW_STATUS_UNKNOWN                                              -1
98 #define MSW_STATUS_VALID                                                0
99 #define MSW_STATUS_INVALID                                              1
100
101 //struct vmt_freespace2_struct;
102 struct scoring_struct;
103 struct squad_war_request;
104 struct squad_war_result;
105
106 // channel to associate when creating a server
107 extern char Multi_fs_tracker_channel[255];
108
109 // channel to use when polling the tracker for games
110 extern char Multi_fs_tracker_filter[255];
111
112 // -----------------------------------------------------------------------------------
113 // FREESPACE MASTER TRACKER DECLARATIONS
114 //
115
116 // give some processor time to the tracker API
117 void multi_fs_tracker_process();
118
119 // initialize the master tracker API for Freespace
120 void multi_fs_tracker_init();
121
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);
124
125 // attempt to log the current game server in with the master tracker
126 void multi_fs_tracker_login_freespace();
127
128 // attempt to update all player statistics and scores on the tracker
129 int multi_fs_tracker_store_stats();
130
131 // attempt to update all player statistics (standalone mode)
132 int multi_fs_std_tracker_store_stats();
133
134 // log freespace out of the tracker
135 void multi_fs_tracker_logout();
136
137 // send a request for a list of games
138 void multi_fs_tracker_send_game_request();
139
140 // if the API has successfully been initialized and is running
141 int multi_fs_tracker_inited();
142
143 // update our settings on the tracker regarding the current netgame stuff
144 void multi_fs_tracker_update_game(netgame_info *ng);
145
146 // if we're currently busy performing some tracker operation (ie, you should wait or not)
147 int multi_fs_tracker_busy();
148
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);
151
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);
154
155 // return an MVALID_STATUS_* value, or -2 if the user has "cancelled"
156 int multi_fs_tracker_validate_mission(char *filename);
157
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);
160
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);
163
164 #endif