fred-mod-eppd-2.11.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_CLIENT_H 00024 #define EPP_CLIENT_H 00025 00026 #include "epp_common.h" 00027 #include "EPP.h" 00028 00033 #define MAX_RETRIES 3 00034 00035 #define RETR_SLEEP 100000 00036 00038 #define raised_exception(ev) ((ev)->_major != CORBA_NO_EXCEPTION) 00039 00040 00042 #define DB_FIELD_SIZE 2000 00043 00045 #define IS_NOT_COMM_FAILURE_EXCEPTION(_ev) \ 00046 (strcmp((_ev)->_id, "IDL:omg.org/CORBA/COMM_FAILURE:1.0")) 00047 00048 #define IS_EPP_ERROR(_ev) \ 00049 (!strcmp((_ev)->_id, "IDL:ccReg/EPP/EppError:1.0")) 00050 00051 #define IS_NO_MESSAGES(_ev) \ 00052 (!strcmp((_ev)->_id, "IDL:ccReg/EPP/NoMessages:1.0")) 00053 00055 typedef enum { 00056 CORBA_OK, 00058 CORBA_ERROR, 00059 CORBA_INT_ERROR, 00061 CORBA_REMOTE_ERROR 00062 }corba_status; 00063 00065 typedef void *service_EPP; 00067 typedef void *service_Logger; 00068 00079 char * 00080 wrap_str(const char *str); 00081 00093 int 00094 epp_call_hello(epp_context *epp_ctx, 00095 service_EPP service, 00096 char **version, 00097 char **curdate); 00098 00113 corba_status 00114 epp_call_login(epp_context *epp_ctx, 00115 service_EPP service, 00116 unsigned long long *loginid, 00117 const ccReg_TID request_id, 00118 epp_lang *lang, 00119 const char *fingerprint, 00120 epp_command_data *cdata); 00121 00132 corba_status 00133 epp_call_logout(epp_context *epp_ctx, 00134 service_EPP service, 00135 unsigned long long *loginid, 00136 const ccReg_TID request_id, 00137 epp_command_data *cdata); 00138 00154 corba_status 00155 epp_call_cmd(epp_context *epp_ctx, 00156 service_EPP service, 00157 unsigned long long loginid, 00158 const ccReg_TID request_id, 00159 epp_command_data *cdata); 00160 00173 void 00174 epp_call_save_output_xml(epp_context *epp_ctx, 00175 service_EPP service, 00176 epp_command_data *cdata, 00177 const char *xml); 00178 00186 void 00187 epp_call_CloseSession(epp_context *epp_ctx, service_EPP service, 00188 unsigned long long loginid); 00189 00190 00191 #define MAX_ERROR_MSG_LEN 100 00192 00193 #endif /* EPP_CLIENT_H */