lobqueries.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*-------------------------------------------------------------------------
  2. LobQueries.h
  3. Database queries for the lobby
  4. Owner:
  5. Copyright 1986-2000 Microsoft Corporation, All Rights Reserved
  6. *-----------------------------------------------------------------------*/
  7. #ifndef _LOBQUERIES_H_
  8. #define _LOBQUERIES_H_
  9. #include "allegdb.h"
  10. // Stuff we need to logon
  11. BEGIN_QUERY(CQLobbyLogon, true,
  12. TEXT("{call GetLobbyLogonInfo(?, ?, ?, ?, ?)}"))
  13. CQLobbyLogonData() :
  14. szReason(NULL)
  15. {}
  16. ~CQLobbyLogonData()
  17. {
  18. delete [] szReason;
  19. }
  20. // Stuff to remember when precessing results
  21. DWORD dwConnectionID; // Remember who this is using a SAFE mechanism
  22. bool fValid : 1; // If false we just go straight to the handler
  23. bool fRetry : 1; // Remember whether the client should retry the logon
  24. char * szReason;
  25. DWORD dTime;
  26. // query parameters
  27. char szCDKey[c_cbCDKey];
  28. char szCharacterName[c_cbName];
  29. int characterID;
  30. char fValidCode; // out
  31. char fCanCheat; // out
  32. //squad stuff
  33. char szSquadName[31]; // constant??? Please???
  34. int status;
  35. int squadID;
  36. int detailedStatus;
  37. BEGIN_PARAM_MAP(CQLobbyLogonData)
  38. COLUMN_ENTRY_TYPE(1, DBTYPE_STR, szCharacterName)
  39. COLUMN_ENTRY_TYPE(2, DBTYPE_I4, characterID)
  40. COLUMN_ENTRY_TYPE(3, DBTYPE_STR, szCDKey)
  41. SET_PARAM_TYPE(DBPARAMIO_OUTPUT)
  42. COLUMN_ENTRY_TYPE(4, DBTYPE_I1, fValidCode)
  43. COLUMN_ENTRY_TYPE(5, DBTYPE_I1, fCanCheat)
  44. END_PARAM_MAP()
  45. BEGIN_COLUMN_MAP(CQLobbyLogonData)
  46. COLUMN_ENTRY_TYPE(1, DBTYPE_STR, szSquadName)
  47. COLUMN_ENTRY_TYPE(2, DBTYPE_I4, status)
  48. COLUMN_ENTRY_TYPE(3, DBTYPE_I4, squadID)
  49. COLUMN_ENTRY_TYPE(4, DBTYPE_I4, detailedStatus)
  50. END_COLUMN_MAP()
  51. END_QUERY(CQLobbyLogon, true)
  52. #endif