1 #include <beagle/beagle.h>
4 test_daemon_information (BeagleClient
*client
)
6 BeagleDaemonInformationRequest
*request
;
7 BeagleResponse
*response
;
8 gboolean get_version
= TRUE
, get_info
= TRUE
, get_status
= TRUE
, is_indexing
= TRUE
;
10 request
= beagle_daemon_information_request_new_specific (get_version
,
15 response
= beagle_client_send_request (client
, BEAGLE_REQUEST (request
), NULL
);
17 g_object_unref (request
);
20 g_print ("Beagle version: %s\n", beagle_daemon_information_response_get_version (BEAGLE_DAEMON_INFORMATION_RESPONSE (response
)));
22 g_print ("%s\n", beagle_daemon_information_response_get_human_readable_status (BEAGLE_DAEMON_INFORMATION_RESPONSE (response
)));
24 g_print ("%s\n", beagle_daemon_information_response_get_index_information (BEAGLE_DAEMON_INFORMATION_RESPONSE (response
)));
26 g_print ("%s\n", (beagle_daemon_information_response_is_indexing (BEAGLE_DAEMON_INFORMATION_RESPONSE (response
)) ? "Indexing" : "Not Indexing"));
28 g_object_unref (response
);
38 client
= beagle_client_new (NULL
);
39 test_daemon_information (client
);