fred-mod-eppd-2.20.2
epp-client.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2018 CZ.NIC, z. s. p. o.
3  *
4  * This file is part of FRED.
5  *
6  * FRED is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * FRED is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with FRED. If not, see <https://www.gnu.org/licenses/>.
18  */
24 #ifndef EPP_CLIENT_H
25 #define EPP_CLIENT_H
26 
27 #include "EPP.h"
28 #include "epp_common.h"
29 
34 #define MAX_RETRIES 3
35 
36 #define RETR_SLEEP 100000
37 
39 #define raised_exception(ev) ((ev)->_major != CORBA_NO_EXCEPTION)
40 
41 
43 #define DB_FIELD_SIZE 2000
44 
46 #define IS_NOT_COMM_FAILURE_EXCEPTION(_ev) \
47  (strcmp((_ev)->_id, "IDL:omg.org/CORBA/COMM_FAILURE:1.0"))
48 
49 #define IS_EPP_ERROR(_ev) (!strcmp((_ev)->_id, "IDL:ccReg/EPP/EppError:1.0"))
50 
51 #define IS_NO_MESSAGES(_ev) (!strcmp((_ev)->_id, "IDL:ccReg/EPP/NoMessages:1.0"))
52 
54 typedef enum {
61 } corba_status;
62 
64 typedef void *service_EPP;
66 typedef void *service_Logger;
67 
78 char *wrap_str(const char *str);
79 
91 int epp_call_hello(epp_context *epp_ctx, service_EPP service, char **version, char **curdate);
92 
108  epp_context *epp_ctx, service_EPP service, unsigned long long *loginid,
109  const ccReg_TID request_id, epp_lang *lang, const char *fingerprint,
110  epp_command_data *cdata);
111 
123  epp_context *epp_ctx, service_EPP service, unsigned long long *loginid,
124  const ccReg_TID request_id, epp_command_data *cdata);
125 
142  epp_context *epp_ctx, service_EPP service, unsigned long long loginid,
143  const ccReg_TID request_id,
144  epp_command_data *cdata);
145 
159  epp_context *epp_ctx, service_EPP service, epp_command_data *cdata, const char *xml);
160 
168 void epp_call_CloseSession(epp_context *epp_ctx, service_EPP service, unsigned long long loginid);
169 
170 
171 #define MAX_ERROR_MSG_LEN 100
172 
173 #endif /* EPP_CLIENT_H */
This should occur unusualy (e.g.
Definition: epp-client.h:58
corba_status epp_call_logout(epp_context *epp_ctx, service_EPP service, unsigned long long *loginid, const ccReg_TID request_id, epp_command_data *cdata)
Call corba logout function.
Definition: epp-client.c:715
corba_status
Possible return values of functions from corba module.
Definition: epp-client.h:54
This structure is central to the concept of the whole module.
Definition: epp_common.h:909
No errors.
Definition: epp-client.h:55
void epp_call_CloseSession(epp_context *epp_ctx, service_EPP service, unsigned long long loginid)
Let the CR know that client has closed tcp session.
Definition: epp-client.c:5244
Epp server is responding but the response is not valid.
Definition: epp-client.h:60
char * wrap_str(const char *str)
Function wraps strings passed from XML parser into strings accepted by CORBA.
Definition: epp-client.c:137
void * service_Logger
Reference to fred-logd CORBA service.
Definition: epp-client.h:66
void epp_call_save_output_xml(epp_context *epp_ctx, service_EPP service, epp_command_data *cdata, const char *xml)
This function calls corba function which saves generated XML in database.
Corba function call failed (e.g.
Definition: epp-client.h:57
EPP context is a group of variables used often together.
Definition: epp_common.h:45
epp_lang
definition of languages (english is default)
Definition: epp_common.h:145
int epp_call_hello(epp_context *epp_ctx, service_EPP service, char **version, char **curdate)
Purpose of this function is to get version string of ccReg from corba server, which is used as part o...
Definition: epp-client.c:257
corba_status epp_call_cmd(epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
Call generic command corba handler which decides what to do on the basis of cdata content...
Definition: epp-client.c:5031
void * service_EPP
Reference to EPP CORBA service.
Definition: epp-client.h:64
corba_status epp_call_login(epp_context *epp_ctx, service_EPP service, unsigned long long *loginid, const ccReg_TID request_id, epp_lang *lang, const char *fingerprint, epp_command_data *cdata)
Call corba login function, which sets up a session variables.
Definition: epp-client.c:620
The most important structures, function definitions and routine declarations are found in this file...