26# include "../corepp/listener.h"
33static const unsigned long MAX_VOTEOPTIONS_BUFFER_LENGTH = 0x100000;
34static const unsigned long MAX_VOTEOPTIONS_UPLOAD_BUFFER_LENGTH = 2024;
35static const unsigned long MAX_VOTEOPTIONS_UPLOAD_BURST = 5;
37typedef enum voteoptiontype_e {
51 VOTE_OPTION_CLIENT_NOT_SELF,
54class VoteOptionListItem
59 class VoteOptionListItem *m_pNext;
70 voteoptiontype_t m_optionType;
71 VoteOptionListItem *m_pListItem;
72 SingleVoteOption *m_pNext;
79class VoteOptions :
public Class
82 CLASS_PROTOTYPE(VoteOptions);
87 SingleVoteOption *m_pHeadOption;
96 void SetupVoteOptions(
const char *configFileName);
97 void SetupVoteOptions(
const char *configFileName,
int length,
const char *buffer);
98 void ParseVoteOptions();
99 const char *GetVoteOptionsFile(
int *outLen)
const;
100 bool GetVoteOptionsMain(
int index, str *outOptionCommand, voteoptiontype_t *outOptionType)
const;
101 bool GetVoteOptionSub(
int index,
int listIndex, str *outCommand)
const;
102 bool GetVoteOptionMainName(
int index, str *outVoteName)
const;
103 bool GetVoteOptionSubName(
int index,
int listIndex, str *outName)
const;
105 void SetupMainOptionsList();
106 void SetupSubOptionsList(
int index);
109inline bool VoteOptions::IsSetup()
const
111 return m_pHeadOption != NULL;
120#if defined(CGAME_DLL)
121 void CG_VoteOptions_StartReadFromServer(
const char *
string);
122 void CG_VoteOptions_ContinueReadFromServer(
const char *
string);
123 void CG_VoteOptions_FinishReadFromServer(
const char *
string);
124 void CG_PushCallVote_f(
void);
125 void CG_PushCallVoteSubList_f(
void);
126 void CG_PushCallVoteSubText_f(
void);
127 void CG_PushCallVoteSubInteger_f(
void);
128 void CG_PushCallVoteSubFloat_f(
void);
129 void CG_PushCallVoteSubClient_f(
void);
130 void CG_PushVote_f(
void);
131 void CG_CallEntryVote_f(
void);