diff --git a/services/system_service/system_service.module b/services/system_service/system_service.module index 1bb4d91..bf2e7c1 100644 --- a/services/system_service/system_service.module +++ b/services/system_service/system_service.module @@ -34,6 +34,14 @@ function system_service_service() { '#auth' => FALSE, '#return' => 'struct', '#help' => t('Returns an object containing a sessid and user.')), + + // system.getServices + array( + '#method' => 'system.getServices', + '#callback' => 'system_service_getservices', + '#access arguments' => array('get available services'), + '#return' => 'struct', + '#help' => t('Returns an object containing all the available services.')), // system.mail array( @@ -145,6 +153,13 @@ function system_service_connect() { } /** + * Returns all the available services + */ +function system_service_getservices() { + return services_get_all(); +} + +/** * Send an email via the Services module. */ function system_service_mail($mailkey, $to, $subject, $body, $from = NULL, $headers = array()) {