| Ximian Connector for Microsoft Exchange Programmer’s Reference Manual | ||||
|---|---|---|---|---|
void test_main (int argc, char **argv); void test_quit (void); void test_abort_if_http_error (E2kHTTPStatus status); char* test_ask_password (const char *prompt); const char* test_get_password (const char *user, const char *host); E2kContext* test_get_context (const char *uri); E2kGlobalCatalog* test_get_gc (const char *server);
void test_main (int argc,
char **argv);
test-utils.o includes a main() function that calls various
initialization routines, starts the main loop, and then calls
test_main(). So test_main() is the entry point for a
test-utils-using program.
argc : |
argc |
argv : |
argv |
void test_abort_if_http_error (E2kHTTPStatus status);
Checks if status is an HTTP or libsoup error, and if so, prints
the error message and exits.
status : |
an HTTP status code |
char* test_ask_password (const char *prompt);
Prints prompt followed by ": " and waits for the user to type
a password (with echoing disabled).
prompt : |
prompt string |
| Returns : | the password (or NULL if stdin is not a tty).
|
const char* test_get_password (const char *user,
const char *host);
Tries to get a password for user on host, by looking it up in
the Evolution password database or by prompting the user.
user : |
username to get the password for |
host : |
Exchange (or global catalog) server name |
| Returns : | the password, or NULL if it could not be determined.
|
E2kContext* test_get_context (const char *uri);
Creates an E2kContext based on uri. If uri does not contain a
username, the user's local username will be used. If it does not
contain a password, test_get_password() will be called to get one.
uri : |
an Exchange HTTP/HTTPS URI |
| Returns : | the new E2kContext (always; if an error occurs,
test_get_context() will exit the program).
|
E2kGlobalCatalog* test_get_gc (const char *server);
Creates an E2kGlobalCatalog for the server server.
test_get_password() will be called to get a password.
server : |
the global catalog server to contact |
| Returns : | the new E2kGlobalCatalog (always; if an error occurs,
test_get_gc() will exit the program).
|