[libgovirt] proxy: Add ovirt_proxy_get_api()



commit e898c078fae8ecc9e4eee5cc0a5a9921923fd123
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Fri Jul 24 13:57:35 2015 +0200

    proxy: Add ovirt_proxy_get_api()

 govirt/govirt.sym    |    3 +++
 govirt/ovirt-proxy.c |   18 ++++++++++++++++++
 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 dc6cc7f..b63b79a 100644
--- a/govirt/ovirt-proxy.c
+++ b/govirt/ovirt-proxy.c
@@ -1033,3 +1033,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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]