fred-mod-eppd-2.19.0
epp-client.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007 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, version 2 of the License.
9  *
10  * FRED is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with FRED. If not, see <http://www.gnu.org/licenses/>.
17  */
23 #ifndef EPP_CLIENT_H
24 #define EPP_CLIENT_H
25 
26 #include "EPP.h"
27 #include "epp_common.h"
28 
33 #define MAX_RETRIES 3
34 
35 #define RETR_SLEEP 100000
36 
38 #define raised_exception(ev) ((ev)->_major != CORBA_NO_EXCEPTION)
39 
40 
42 #define DB_FIELD_SIZE 2000
43 
45 #define IS_NOT_COMM_FAILURE_EXCEPTION(_ev) \
46  (strcmp((_ev)->_id, "IDL:omg.org/CORBA/COMM_FAILURE:1.0"))
47 
48 #define IS_EPP_ERROR(_ev) (!strcmp((_ev)->_id, "IDL:ccReg/EPP/EppError:1.0"))
49 
50 #define IS_NO_MESSAGES(_ev) (!strcmp((_ev)->_id, "IDL:ccReg/EPP/NoMessages:1.0"))
51 
53 typedef enum {
60 } corba_status;
61 
63 typedef void *service_EPP;
65 typedef void *service_Logger;
66 
77 char *wrap_str(const char *str);
78 
90 int epp_call_hello(epp_context *epp_ctx, service_EPP service, char **version, char **curdate);
91 
107  epp_context *epp_ctx, service_EPP service, unsigned long long *loginid,
108  const ccReg_TID request_id, epp_lang *lang, const char *fingerprint,
109  epp_command_data *cdata);
110 
122  epp_context *epp_ctx, service_EPP service, unsigned long long *loginid,
123  const ccReg_TID request_id, epp_command_data *cdata);
124 
141  epp_context *epp_ctx, service_EPP service, unsigned long long loginid,
142  const ccReg_TID request_id,
143  epp_command_data *cdata);
144 
158  epp_context *epp_ctx, service_EPP service, epp_command_data *cdata, const char *xml);
159 
167 void epp_call_CloseSession(epp_context *epp_ctx, service_EPP service, unsigned long long loginid);
168 
169 
170 #define MAX_ERROR_MSG_LEN 100
171 
172 #endif /* EPP_CLIENT_H */
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
This should occur unusualy (e.g.
Definition: epp-client.h:57
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
Possible return values of functions from corba module.
Definition: epp-client.h:53
This structure is central to the concept of the whole module.
Definition: epp_common.h:908
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
No errors.
Definition: epp-client.h:54
Epp server is responding but the response is not valid.
Definition: epp-client.h:59
void * service_Logger
Reference to fred-logd CORBA service.
Definition: epp-client.h:65
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:56
EPP context is a group of variables used often together.
Definition: epp_common.h:44
epp_lang
definition of languages (english is default)
Definition: epp_common.h:144
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 *certID, epp_command_data *cdata)
Call corba login function, which sets up a session variables.
Definition: epp-client.c:620
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_EPP
Reference to EPP CORBA service.
Definition: epp-client.h:63
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
The most important structures, function definitions and routine declarations are found in this file...