#include <ticket.h>
Collaboration diagram for Dv::Ticket::Ticket:
Public Types | |
typedef unsigned long | SERIAL |
Type of serial number of ticket. | |
typedef Dv::Util::ref< Dv::Ticket::Ticket > | Ref |
Type of reference-counted pointer to ticket. | |
Public Member Functions | |
const User & | user () const |
SERIAL | serial () const |
const Dv::Util::Date & | expiration_date () const |
const std::string & | server_host () const |
const int | server_port () const |
const std::string & | owner_host () const |
Dv::Xml::Node | xml (const std::string &name="ticket") const |
Return an XML representation of a ticket. | |
Static Public Member Functions | |
Ref | buy (const std::string &host, int port, const std::string &name, const std::string &password, const std::string &info="", size_t duration=30) throw () |
Obtain a new ticket from a ticket server. | |
Ref | buy (const std::string &client_host, const std::string &server_host, int port, const std::string &name, const std::string &password, const std::string &info="", size_t duration=30) throw () |
Obtain a new ticket from a ticket server. | |
Ref | buy_anon (const std::string &host, int port, const std::string &name="anonymous", const std::string &info="", size_t duration=30) throw () |
Buy an anonymous ticket from a ticket server. | |
Ref | validate (const std::string &server_host, int server_port, SERIAL serial) throw () |
Obtain a ticket by validating a serial number with a ticket server. | |
Ref | validate (const std::string &server_host, int server_port, const std::string &host, SERIAL serial) throw () |
Obtain a ticket by validating a serial number with a ticket server. | |
Private Member Functions | |
Ticket (const Ticket &) | |
Copy ctor is forbidden. | |
Ticket & | operator= (const Ticket &) |
Assignment is forbidden. | |
Ticket (const User &user, SERIAL serial, Dv::Util::Date expiration_date, const std::string &server_host, int server_port, const std::string &owner_host) throw () | |
Simple ctor. | |
Ticket (const Dv::Xml::Node::Ref &root, const std::string &server_host, int server_port) | |
Simple ctor. | |
Private Attributes | |
User | user_ |
User to whom this ticket was issued. | |
SERIAL | serial_ |
Unique serial number of this ticket. | |
Dv::Util::Date | expiration_date_ |
Expiration date for this ticket. | |
std::string | server_host_ |
Host of server that issued this ticket. | |
int | server_port_ |
Port of server that issued this ticket. | |
std::string | owner_host_ |
Name of host for which this ticket is valid. | |
Friends | |
class | Server |
Definition at line 19 of file ticket.h.
|
Type of serial number of ticket.
Definition at line 25 of file ticket.h. Referenced by serial(). |
|
Type of reference-counted pointer to ticket.
|
|
Copy ctor is forbidden.
|
|
Simple ctor.
|
|
Simple ctor.
|
|
Definition at line 30 of file ticket.h. References user_. |
|
|
|
Definition at line 34 of file ticket.h. References expiration_date_. |
|
Definition at line 36 of file ticket.h. References server_host_. |
|
Definition at line 38 of file ticket.h. References server_port_. |
|
Definition at line 40 of file ticket.h. References owner_host_. |
|
Return an XML representation of a ticket.
|
|
Obtain a new ticket from a ticket server.
|
|
Obtain a new ticket from a ticket server. This function explicitly specifies the client host, which may be different from the host on which this function is called. It is useful e.g. for general "login" cgi programs. Such programs avoid user programs to deal with passwords.
|
|
Buy an anonymous ticket from a ticket server.
|
|
Obtain a ticket by validating a serial number with a ticket server.
|
|
Obtain a ticket by validating a serial number with a ticket server.
|
|
Assignment is forbidden.
|
|
|
|
User to whom this ticket was issued.
Definition at line 153 of file ticket.h. Referenced by user(). |
|
Unique serial number of this ticket.
Definition at line 157 of file ticket.h. Referenced by serial(). |
|
Expiration date for this ticket.
Definition at line 159 of file ticket.h. Referenced by expiration_date(). |
|
Host of server that issued this ticket.
Definition at line 161 of file ticket.h. Referenced by server_host(). |
|
Port of server that issued this ticket.
Definition at line 163 of file ticket.h. Referenced by server_port(). |
|
Name of host for which this ticket is valid.
Definition at line 165 of file ticket.h. Referenced by owner_host(). |
dvticket-0.7.1 | [24 October, 2003] |