DCHK Client Version 0.5.7 - Documentation
|
|
dchk::CDomainList Class Reference
[C++-API]
A class to hold a list of domains.
More...
#include <dchk.h>
Detailed Description
This class implements a list of domains stored in DCHK_RECORD structures. It is used for bundled DCHK requests.
Constructor & Destructor Documentation
dchk::CDomainList::CDomainList |
( |
|
) |
|
dchk::CDomainList::~CDomainList |
( |
|
) |
|
Frees all memory used by the class an the elements of the list.
Member Function Documentation
int dchk::CDomainList::AddDomain |
( |
const char * |
domain, |
|
|
int |
n = 0 | |
|
) |
| | |
With this member function you can add a domain name to the list
- Parameters:
-
[in] | domain | pointer to domain name, which must not be longer than 512 bytes |
[in] | n | optional parameter containing the size of the domain string. Only the first
bytes of the domain string will be copied into the list. If domain is shorter than
, the complete string is copied. |
- Returns:
- On success, the function returns 1, otherwise 0. An error could only occur, when the
domain
parameter points to NULL, when the process is out of memory or when the domain name is longer than 512 bytes.
void dchk::CDomainList::Clear |
( |
|
) |
|
Frees all memory used by the class an the elements of the list.
This function is used internally to copy an error from an IRISLWZ_HANDLE object into this class.
- Parameters:
-
int dchk::CDomainList::Count |
( |
|
) |
const |
This function returns the number of elements in the list.
- Returns:
- Number of elements
int dchk::CDomainList::Explode |
( |
const char * |
string, |
|
|
const char * |
delimiter | |
|
) |
| | |
With this function you can add multiple domains to the list, which are all in one string and separated by a specific delimiter.
- Parameters:
-
[in] | string | Pointer to a text string containing the domain names |
[in] | delimiter | Pointer to a string, which contains the delimiter if the domains. This could be a single char (like space or tab), but also a longer string. |
- Returns:
- On success, the function returns the number of domains added to the list, otherwise 0.
const char * dchk::CError::GetAdditionalErrorText |
( |
|
) |
const [inherited] |
Return additional information about last error.
- Returns:
- Pointer to the additional error text, or NULL if there is no text.
int dchk::CError::GetErrorCode |
( |
|
) |
const [inherited] |
Return last error code
- Returns:
- last error code
const char * dchk::CError::GetErrorText |
( |
|
) |
const [inherited] |
Return text of last error code
- Returns:
- Pointer to the error text.
This function returns a DCHK_RECORD pointer to the first element in the list.
- Returns:
- Returns a DCHK_RECORD pointer or NULL, if the list contains no entries.
This function returns a DCHK_RECORD pointer to the next element in the list.
- Returns:
- Returns a DCHK_RECORD pointer or NULL, if the end of the list was reached.
void dchk::CError::PrintError |
( |
|
) |
const [inherited] |
This function prints the last error occurred in this class to STDOUT (Screen).
void dchk::CDomainList::Reset |
( |
|
) |
|
This function resets the internal pointer to the first element in the list. Next call to CDomainList::GetNext will return the first element.
void dchk::CError::SetError |
( |
int |
code, |
|
|
const char * |
fmt = NULL , |
|
|
|
... | |
|
) |
| | [inherited] |
This function is used internally to store an error in this class
- Parameters:
-
[in] | code | Error code |
[in] | fmt | Format string for an additional error text. The syntax of this string is identical to sprintf/printf. |
[in] | ... | Optional additional parameters for the format string |
Friends And Related Function Documentation
friend class CDchk [friend] |
Field Documentation
The documentation for this class was generated from the following files:
- include/dchk.h
- src/lib/CDchk.cpp