Example: List and print out the calendars supported by a server. Free memory returned by a CSA function. list_calendar() { CSA_return_code stat; CSA_uint32 i, number; CSA_calendar_user *calendars; char *host; /*specify some machine in the network */ host = "somehost"; stat= csa_list_calendars(host, &number, &calendars, NULL); for (i = 0; i< number; i++) { /* the calendar_address field contains the address of the * the calendar in the format "user@host" */ printf("%d: %s\n", i, calendars[i].calendar_address); } /* Example: free memory returned by a CSA function * free the memory returned by csa_list_calendars above */ stat = csa_free(calendars); } |