fred-mod-eppd-2.15.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_common.h"
27 #include "EPP.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) \
49  (!strcmp((_ev)->_id, "IDL:ccReg/EPP/EppError:1.0"))
50 
51 #define IS_NO_MESSAGES(_ev) \
52  (!strcmp((_ev)->_id, "IDL:ccReg/EPP/NoMessages:1.0"))
53 
55 typedef enum {
63 
65 typedef void *service_EPP;
67 typedef void *service_Logger;
68 
79 char *
80 wrap_str(const char *str);
81 
93 int
95  service_EPP service,
96  char **version,
97  char **curdate);
98 
114 epp_call_login(epp_context *epp_ctx,
115  service_EPP service,
116  unsigned long long *loginid,
117  const ccReg_TID request_id,
118  epp_lang *lang,
119  const char *fingerprint,
120  epp_command_data *cdata);
121 
134  service_EPP service,
135  unsigned long long *loginid,
136  const ccReg_TID request_id,
137  epp_command_data *cdata);
138 
156 epp_call_cmd(epp_context *epp_ctx,
157  service_EPP service,
158  unsigned long long loginid,
159  const ccReg_TID request_id,
160  int has_contact_mailing_address_extension,
161  epp_command_data *cdata);
162 
175 void
177  service_EPP service,
178  epp_command_data *cdata,
179  const char *xml);
180 
188 void
190  unsigned long long loginid);
191 
192 
193 #define MAX_ERROR_MSG_LEN 100
194 
195 #endif /* EPP_CLIENT_H */
This should occur unusualy (e.g.
Definition: epp-client.h:59
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:710
corba_status
Possible return values of functions from corba module.
Definition: epp-client.h:55
This structure is central to the concept of the whole module.
Definition: epp_common.h:836
No errors.
Definition: epp-client.h:56
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:5039
Epp server is responding but the response is not valid.
Definition: epp-client.h:61
char * wrap_str(const char *str)
Function wraps strings passed from XML parser into strings accepted by CORBA.
Definition: epp-client.c:144
void * service_Logger
Reference to fred-logd CORBA service.
Definition: epp-client.h:67
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:58
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:140
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:264
corba_status epp_call_cmd(epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, int has_contact_mailing_address_extension, epp_command_data *cdata)
Call generic command corba handler which decides what to do on the basis of cdata content...
Definition: epp-client.c:4802
void * service_EPP
Reference to EPP CORBA service.
Definition: epp-client.h:65
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:616
The most important structures, function definitions and routine declarations are found in this file...