diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2015-07-24 13:57:35 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2015-07-27 21:11:35 +0200 |
commit | efcbeeb63ff5d4ecd00b0f9468578e10c724f745 (patch) | |
tree | 86f3e4cab937f689e4685c339771f48c9f81e811 | |
parent | 9ba50c725d968fe82f62cb0861113492d9ef1f51 (diff) |
proxy: Add ovirt_proxy_get_api()
-rw-r--r-- | govirt/govirt.sym | 3 | ||||
-rw-r--r-- | govirt/ovirt-proxy.c | 18 | ||||
-rw-r--r-- | govirt/ovirt-proxy.h | 1 |
3 files changed, 22 insertions, 0 deletions
diff --git a/govirt/govirt.sym b/govirt/govirt.sym index 178ab07..8371779 100644 --- a/govirt/govirt.sym +++ b/govirt/govirt.sym @@ -107,4 +107,7 @@ GOVIRT_0.3.2 { ovirt_resource_delete_finish; } GOVIRT_0.3.1; +GOVIRT_0.3.4 { + ovirt_proxy_get_api; +} GOVIRT_0.3.2; # .... define new API here using predicted next version number .... diff --git a/govirt/ovirt-proxy.c b/govirt/ovirt-proxy.c index d2c1d47..ddfe0b9 100644 --- a/govirt/ovirt-proxy.c +++ b/govirt/ovirt-proxy.c @@ -1022,3 +1022,21 @@ ovirt_proxy_fetch_api_finish(OvirtProxy *proxy, return proxy->priv->api; } + + +/** + * ovirt_proxy_get_api: + * + * Gets the api entry point to access remote oVirt resources and collections. + * This method does not initiate any network activity, the remote API entry point + * must have been fetched with ovirt_proxy_fetch_api() or + * ovirt_proxy_fetch_api_async() before calling this function. + * + * Return value: (transfer none): an #OvirtApi instance used to interact with + * oVirt REST API. + */ +OvirtApi * +ovirt_proxy_get_api(OvirtProxy *proxy) +{ + return proxy->priv->api; +} diff --git a/govirt/ovirt-proxy.h b/govirt/ovirt-proxy.h index d011209..2f9c2be 100644 --- a/govirt/ovirt-proxy.h +++ b/govirt/ovirt-proxy.h @@ -104,5 +104,6 @@ void ovirt_proxy_fetch_api_async(OvirtProxy *proxy, OvirtApi *ovirt_proxy_fetch_api_finish(OvirtProxy *proxy, GAsyncResult *result, GError **err); +OvirtApi *ovirt_proxy_get_api(OvirtProxy *proxy); #endif |