fred-mod-eppd-2.12.0
|
00001 /* 00002 * Copyright (C) 2007 CZ.NIC, z.s.p.o. 00003 * 00004 * This file is part of FRED. 00005 * 00006 * FRED is free software: you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation, version 2 of the License. 00009 * 00010 * FRED is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with FRED. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00023 #ifndef EPP_PARSER_H 00024 #define EPP_PARSER_H 00025 00032 typedef enum { 00033 PARSER_CMD_LOGIN, 00034 PARSER_CMD_LOGOUT, 00035 PARSER_CMD_OTHER, 00036 PARSER_NOT_VALID, 00041 PARSER_HELLO, 00042 /* 00043 * when following status values are returned, connection is closed 00044 */ 00045 PARSER_NOT_COMMAND, 00046 PARSER_NOT_XML, 00047 PARSER_ESCHEMA, 00053 PARSER_EINTERNAL 00054 }parser_status; 00055 00061 typedef enum { 00062 EPP_RED_UNKNOWN_CMD, 00063 EPP_RED_LOGIN, 00064 EPP_RED_LOGOUT, 00065 EPP_RED_CHECK, 00066 EPP_RED_INFO, 00067 EPP_RED_POLL, 00068 EPP_RED_TRANSFER, 00069 EPP_RED_CREATE, 00070 EPP_RED_DELETE, 00071 EPP_RED_RENEW, 00072 EPP_RED_UPDATE, 00073 EPP_RED_EXTCMD, 00074 EPP_RED_HELLO 00075 }epp_red_command_type; 00076 00084 void * 00085 epp_parser_init(const char *url_schema); 00086 00093 void 00094 epp_parser_init_cleanup(void *schema); 00095 00109 parser_status 00110 epp_parse_command(epp_context *epp_ctx, 00111 int loggedin, 00112 void *schema, 00113 const char *request, 00114 unsigned bytes, 00115 epp_command_data **cdata, 00116 epp_red_command_type *cmd_type); 00117 00123 void 00124 epp_parser_request_cleanup(void *cdata_arg); 00125 00126 00127 #endif /* EPP_PARSER_H */