| 1 | /* |
| 2 | * Copyright (C) 2007 Pelish ([email protected]) |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; either version 2 |
| 7 | * of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 17 | */ |
| 18 | |
| 19 | #ifndef JUST_NEED_TYPES |
| 20 | |
| 21 | #ifndef INCLUDED_APIREGISTER_TYPES |
| 22 | #define INCLUDED_APIREGISTER_TYPES |
| 23 | |
| 24 | #include "common/packet.h" |
| 25 | #include "connection.h" |
| 26 | #endif |
| 27 | |
| 28 | namespace pvpgn |
| 29 | { |
| 30 | |
| 31 | namespace bnetd |
| 32 | { |
| 33 | |
| 34 | typedef struct apiregmember |
| 35 | #ifdef APIREGISTER_INTERNAL_ACCESS |
| 36 | { |
| 37 | t_connection * conn; |
| 38 | char const * email; |
| 39 | char const * bday; |
| 40 | char const * bmonth; |
| 41 | char const * byear; |
| 42 | char const * langcode; |
| 43 | char const * sku; /* here are SKUs of all installed games */ |
| 44 | char const * ver; /* same as with SKU - versions of all installed games */ |
| 45 | char const * serial; /* also serials of all installed games */ |
| 46 | char const * sysid; |
| 47 | char const * syscheck; |
| 48 | char const * oldnick; /* client send also all nicks that was registerd in the past */ |
| 49 | char const * oldpass; /* and passwords for oldnicks */ |
| 50 | char const * newnick; |
| 51 | char const * newpass; |
| 52 | char const * newpass2; |
| 53 | char const * parentemail; |
| 54 | bool newsletter; /* do user want to sending news by e-mail? */ |
| 55 | bool shareinfo; /* can EA/Westwood shared e-mail contact for sending news? :) */ |
| 56 | char const * request; /* API Register request (knowed requests are defined below) */ |
| 57 | } |
| 58 | #endif |
| 59 | t_apiregmember; |
| 60 | |
| 61 | #ifndef INCLUDED_HANDLE_APIREG_PROTOS |
| 62 | #define INCLUDED_HANDLE_APIREG_PROTOS |
| 63 | |
| 64 | #define REQUEST_AGEVERIFY "apireg_ageverify" |
| 65 | #define REQUEST_GETNICK "apireg_getnick" |
| 66 | |
| 67 | extern int apireglist_create(void); |
| 68 | extern int apireglist_destroy(void); |
| 69 | |
| 70 | extern int handle_apireg_packet(t_connection * conn, t_packet const * const packet); |
| 71 | |
| 72 | } |
| 73 | |
| 74 | } |
| 75 | |
| 76 | #endif |
| 77 | #endif |