libepp_nicbr
Public Member Functions | List of all members
Session Class Reference

EPP Session Class. More...

#include <Session.H>

Public Member Functions

 Session (const string &server="localhost", const int port=700, const string &templates_dir=TEMPLATESDIR)
 Constructor. More...
 
 ~Session ()
 Destructor.
 
void enable_xml_validation (const string &schemas_dir=SCHEMASDIR)
 Enable XML Parser Validation. More...
 
void disable_xml_validation ()
 Disable XML Parser Validation.
 
void enable_cert_common_name_check ()
 Enables peer's certificate common name check.
 
void disable_cert_common_name_check ()
 Disables peer's certificate common name check.
 
void connect (const string &client_cert_file, const string &root_ca_file, const string &pem_passphrase="")
 Establish the Connection. More...
 
void disconnect ()
 Close the connection.
 
void send_hello ()
 Send Hello.
 
Greetingget_greeting ()
 Get Greeting. More...
 
void process_action (Action *action_to_be_processed, const string clTRID="")
 Process Action. More...
 
void runXML (const string &input)
 Send XML input command. More...
 
string get_last_command () const
 Get last command. More...
 
string get_last_response () const
 Get last response. More...
 
string get_server () const
 Get EPP server. More...
 
int get_port () const
 Get EPP server port. More...
 
void set_server (const string &server)
 Set EPP server name. More...
 
void set_port (const int &port)
 Set EPP server port. More...
 
void set_clTrID (const string &clTRID)
 
string get_clTrID () const
 

Detailed Description

EPP Session Class.

Constructor & Destructor Documentation

Session::Session ( const string &  server = "localhost",
const int  port = 700,
const string &  templates_dir = TEMPLATESDIR 
)

Constructor.

Parameters
serverEpp Server Name
portEpp Server Port Number
templates_dirOptional Path to the XML Templates Directory

Member Function Documentation

void Session::connect ( const string &  client_cert_file,
const string &  root_ca_file,
const string &  pem_passphrase = "" 
)

Establish the Connection.

Parameters
client_cert_fileClient certificate file
root_ca_fileRoot certificate file
pem_passphraseOptional passphrase for an encrypted private key
void Session::enable_xml_validation ( const string &  schemas_dir = SCHEMASDIR)

Enable XML Parser Validation.

Parameters
schemas_dirOptional Path to the XML schemas
string Session::get_clTrID ( ) const

Returns the current client transaction id used in the EPP commands. If empty, the client transaction id will be random.

Returns
Client transaction id
Greeting* Session::get_greeting ( )

Get Greeting.

Returns
Pointer to the Greeting
string Session::get_last_command ( ) const

Get last command.

Returns
Return the last command in XML format
string Session::get_last_response ( ) const

Get last response.

Returns
Return the last response in XML format
int Session::get_port ( ) const

Get EPP server port.

Returns
EPP server port
string Session::get_server ( ) const

Get EPP server.

Returns
EPP server name
void Session::process_action ( Action action_to_be_processed,
const string  clTRID = "" 
)

Process Action.

Parameters
action_to_be_processedAction to be processed
clTRIDOptional Client Transaction ID
void Session::runXML ( const string &  input)

Send XML input command.

Parameters
inputXML input command
void Session::set_clTrID ( const string &  clTRID)

Set a custom client transaction id to be used in the requests. To go back using a random client transaction id just set an empty string. This should be used for debug purpouse only.

Parameters
clTRIDclient transaction id
void Session::set_port ( const int &  port)

Set EPP server port.

Parameters
portEPP server port
void Session::set_server ( const string &  server)

Set EPP server name.

Parameters
serverEPP server name

The documentation for this class was generated from the following file: