|  |  |  | Evolution Connector for Microsoft Exchange Programmer’s Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
void test_main (gint argc,gchar **argv); void test_quit (void); void test_abort_if_http_error (E2kHTTPStatus status); gchar * test_ask_password (const gchar *prompt); const gchar * test_get_password (const gchar *user,const gchar *host); E2kContext * test_get_context (const gchar *uri); E2kGlobalCatalog * test_get_gc (const gchar *server);
void test_main (gint argc,gchar **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 | 
| 
 | 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.
| 
 | an HTTP status code | 
gchar *             test_ask_password                   (const gchar *prompt);
Prints prompt followed by ": " and waits for the user to type
a password (with echoing disabled).
| 
 | prompt string | 
| Returns : | the password (or NULLif stdin is not a tty). | 
const gchar * test_get_password (const gchar *user,const gchar *host);
Tries to get a password for user on host, by looking it up in
the Evolution password database or by prompting the user.
| 
 | username to get the password for | 
| 
 | Exchange (or global catalog) server name | 
| Returns : | the password, or NULLif it could not be determined. | 
E2kContext *        test_get_context                    (const gchar *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.
| 
 | 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 gchar *server);
Creates an E2kGlobalCatalog for the server server.
test_get_password() will be called to get a password.
| 
 | the global catalog server to contact | 
| Returns : | the new E2kGlobalCatalog(always; if an error occurs,test_get_gc()will exit the program). |