openmohaa/code/gamespy/sv_gqueryreporting.h

67 lines
2.1 KiB
C
Raw Normal View History

2023-02-05 13:27:22 +01:00
/*
===========================================================================
Copyright (C) 2023 the OpenMoHAA team
This file is part of OpenMoHAA source code.
OpenMoHAA source code 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; either version 2 of the License,
or (at your option) any later version.
OpenMoHAA source code 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 OpenMoHAA source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
2023-06-17 01:43:42 +02:00
#pragma once
#include "common/gsPlatformSocket.h"
2023-08-26 21:12:32 +02:00
#define MAX_KEYVALUES_LENGTH 1400
2023-07-05 21:24:14 +02:00
typedef void (*qr_querycallback_t)(char *outbuf, int maxlen, void *userdata);
typedef void (*qr_custom_handler_t)(const char *query, struct sockaddr *sender);
2023-02-05 01:40:14 +01:00
typedef enum query_e {
2023-07-05 21:24:14 +02:00
qtunknown,
qtbasic,
qtinfo,
qtrules,
qtplayers,
qtstatus,
qtpackets,
qtecho,
qtsecure
2023-02-05 01:40:14 +01:00
} query_t;
typedef struct qr_implementation_s {
2023-07-05 21:24:14 +02:00
void *querysock;
void *hbsock;
char gamename[64];
char secret_key[128];
qr_querycallback_t qr_basic_callback;
qr_querycallback_t qr_info_callback;
qr_querycallback_t qr_rules_callback;
qr_querycallback_t qr_players_callback;
long unsigned int lastheartbeat;
int queryid;
int packetnumber;
int qport;
char no_query;
struct sockaddr_in master_saddr;
int unk2;
int unk3;
int unk4;
qr_custom_handler_t qr_custom_handler;
void *udata;
2023-02-05 01:40:14 +01:00
} qr_implementation_t, *qr_t;
2023-07-29 19:30:39 +02:00
#define MASTER_SERVER_HOST "master.x-null.net"