Code refactoring, update the name of ml-agent interface.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
#include <glib/gstdio.h>
#include <json-glib/json-glib.h>
-#include "ml-agent-dbus-interface.h"
+#include "ml-agent-interface.h"
#include "ml-api-internal.h"
#include "ml-api-service-private.h"
#include "ml-api-service.h"
"The parameter, 'pipeline_desc' is NULL. It should be a valid string.");
}
- ret =
- ml_agent_dbus_interface_pipeline_set_description (name, pipeline_desc,
- &err);
+ ret = ml_agent_pipeline_set_description (name, pipeline_desc, &err);
if (ret < 0) {
_ml_error_report ("Failed to invoke the method set_pipeline (%s).",
err ? err->message : "Unknown error");
*pipeline_desc = NULL;
}
- ret =
- ml_agent_dbus_interface_pipeline_get_description (name, pipeline_desc,
- &err);
+ ret = ml_agent_pipeline_get_description (name, pipeline_desc, &err);
if (ret < 0) {
_ml_error_report ("Failed to invoke the method get_pipeline (%s).",
err ? err->message : "Unknown error");
"The parameter, 'name' is NULL, It should be a valid string.");
}
- ret = ml_agent_dbus_interface_pipeline_delete (name, &err);
+ ret = ml_agent_pipeline_delete (name, &err);
if (ret < 0) {
_ml_error_report ("Failed to invoke the method delete_pipeline (%s).",
err ? err->message : "Unknown error");
"Failed to allocate memory for the service handle's private data. Out of memory?");
}
- ret = ml_agent_dbus_interface_pipeline_launch (name, &(server->id), &err);
+ ret = ml_agent_pipeline_launch (name, &(server->id), &err);
if (ret < 0) {
g_free (server);
g_free (mls);
mls = (ml_service_s *) h;
server = (_ml_service_server_s *) mls->priv;
- ret = ml_agent_dbus_interface_pipeline_start (server->id, &err);
+ ret = ml_agent_pipeline_start (server->id, &err);
if (ret < 0) {
_ml_error_report ("Failed to invoke the method start_pipeline (%s).",
err ? err->message : "Unknown error");
mls = (ml_service_s *) h;
server = (_ml_service_server_s *) mls->priv;
- ret = ml_agent_dbus_interface_pipeline_stop (server->id, &err);
+ ret = ml_agent_pipeline_stop (server->id, &err);
if (ret < 0) {
_ml_error_report ("Failed to invoke the method stop_pipeline (%s).",
err ? err->message : "Unknown error");
}
mls = (ml_service_s *) h;
server = (_ml_service_server_s *) mls->priv;
- ret = ml_agent_dbus_interface_pipeline_get_state (server->id, &_state, &err);
+ ret = ml_agent_pipeline_get_state (server->id, &_state, &err);
if (ret < 0) {
_ml_error_report ("Failed to invoke the method get_state (%s).",
err ? err->message : "Unknown error");
app_info = _get_app_info ();
- ret = ml_agent_dbus_interface_model_register (name, path, activate,
+ ret = ml_agent_model_register (name, path, activate,
description ? description : "", app_info ? app_info : "", version, &err);
if (ret < 0) {
_ml_error_report ("Failed to invoke the method model_register (%s).",
"The parameter, 'description' is NULL. It should be a valid string.");
}
- ret =
- ml_agent_dbus_interface_model_update_description (name, version,
- description, &err);
-
+ ret = ml_agent_model_update_description (name, version, description, &err);
if (ret < 0) {
_ml_error_report
("Failed to invoke the method model_update_description (%s).",
"The parameter, 'version' is 0. It should be a valid unsigned int.");
}
- ret = ml_agent_dbus_interface_model_activate (name, version, &err);
+ ret = ml_agent_model_activate (name, version, &err);
if (ret < 0) {
_ml_error_report ("Failed to invoke the method model_activate (%s).",
err ? err->message : "Unknown error");
}
*info = NULL;
- ret = ml_agent_dbus_interface_model_get (name, version, &description, &err);
+ ret = ml_agent_model_get (name, version, &description, &err);
if (ML_ERROR_NONE != ret || !description) {
_ml_error_report ("Failed to invoke the method model_get (%s).",
err ? err->message : "Unknown error");
}
*info = NULL;
- ret = ml_agent_dbus_interface_model_get_activated (name, &description, &err);
+ ret = ml_agent_model_get_activated (name, &description, &err);
if (ML_ERROR_NONE != ret || !description) {
_ml_error_report ("Failed to invoke the method model_get_activated (%s).",
err ? err->message : "Unknown error");
}
*info_list = NULL;
- ret = ml_agent_dbus_interface_model_get_all (name, &description, &err);
+ ret = ml_agent_model_get_all (name, &description, &err);
if (ML_ERROR_NONE != ret || !description) {
_ml_error_report_return (ret,
"Failed to invoke the method model_get_all (%s).",
"The parameter, 'name' is NULL. It should be a valid string.");
}
- ret = ml_agent_dbus_interface_model_delete (name, version, &err);
+ ret = ml_agent_model_delete (name, version, &err);
if (ret < 0) {
_ml_error_report ("Failed to invoke the method model_delete (%s).",
err ? err->message : "Unknown error");
app_info = _get_app_info ();
- ret = ml_agent_dbus_interface_resource_add (name, path,
- description ? description : "", app_info ? app_info : "", &err);
+ ret = ml_agent_resource_add (name, path, description ? description : "",
+ app_info ? app_info : "", &err);
if (ret < 0) {
_ml_error_report ("Failed to invoke the method resource_add (%s).",
err ? err->message : "Unknown error");
"The parameter, 'name' is NULL. It should be a valid string.");
}
- ret = ml_agent_dbus_interface_resource_delete (name, &err);
+ ret = ml_agent_resource_delete (name, &err);
if (ret < 0) {
_ml_error_report ("Failed to invoke the method resource_delete (%s).",
err ? err->message : "Unknown error");
}
*res = NULL;
- ret = ml_agent_dbus_interface_resource_get (name, &res_info, &err);
+ ret = ml_agent_resource_get (name, &res_info, &err);
if (ML_ERROR_NONE != ret || !res_info) {
_ml_error_report_return (ret,
"Failed to invoke the method resource_get (%s).",
#include "ml-api-internal.h"
#include "ml-api-service.h"
#include "ml-api-service-private.h"
-#include "ml-agent-dbus-interface.h"
+#include "ml-agent-interface.h"
/**
* @brief Destroy the pipeline of given ml_service_h
_ml_service_server_s *server = (_ml_service_server_s *) mls->priv;
GError *err = NULL;
- ret = ml_agent_dbus_interface_pipeline_destroy (server->id, &err);
+ ret = ml_agent_pipeline_destroy (server->id, &err);
if (ret < 0) {
_ml_error_report ("Failed to invoke the method destroy_pipeline (%s).",
err ? err->message : "Unknown error");
-ml_agentd_headers = files('ml-agent-dbus-interface.h')
+ml_agentd_headers = files('ml-agent-interface.h')
/**
- * @file ml-agent-dbus-interface.h
+ * @file ml-agent-interface.h
* @date 5 April 2023
- * @brief A set of exported DBus interfaces for managing pipelines and models
+ * @brief A set of exported ml-agent interfaces for managing pipelines, models, and other service.
* @see https://github.com/nnstreamer/api
* @author Wook Song <wook16.song@samsung.com>
* @bug No known bugs except for NYI items
*/
-#ifndef __ML_AGENT_DBUS_INTERFACE_H__
-#define __ML_AGENT_DBUS_INTERFACE_H__
+#ifndef __ML_AGENT_INTERFACE_H__
+#define __ML_AGENT_INTERFACE_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <glib.h>
/**
- * @brief A dbus interface exported for setting the description of a pipeline
+ * @brief An interface exported for setting the description of a pipeline
* @param[in] name A name indicating the pipeline whose description would be set
* @param[in] pipeline_desc A stringified description of the pipeline
* @param[out] err Return location for error of NULL
* @return 0 on success, a negative error value if @err is set
*/
-gint ml_agent_dbus_interface_pipeline_set_description (const gchar *name, const gchar *pipeline_desc, GError **err);
+gint ml_agent_pipeline_set_description (const gchar *name, const gchar *pipeline_desc, GError **err);
/**
- * @brief A dbus interface exported for getting the pipeline's description corresponding to the given @name
+ * @brief An interface exported for getting the pipeline's description corresponding to the given @name
* @param[in] name A given name of the pipeline to get the description
* @param[out] pipeline_desc A stringified description of the pipeline
* @param[out] err Return location for error of NULL
* @return 0 on success, a negative error value if @err is set
*/
-gint ml_agent_dbus_interface_pipeline_get_description (const gchar *name, gchar **pipeline_desc, GError **err);
+gint ml_agent_pipeline_get_description (const gchar *name, gchar **pipeline_desc, GError **err);
/**
- * @brief A dbus interface exported for deletion of the pipeline's description corresponding to the given @name
+ * @brief An interface exported for deletion of the pipeline's description corresponding to the given @name
* @param[in] name A given name of the pipeline to remove the description
* @param[out] err Return location for error of NULL
* @return 0 on success, a negative error value if @err is set
*/
-gint ml_agent_dbus_interface_pipeline_delete (const gchar * name, GError ** err);
+gint ml_agent_pipeline_delete (const gchar *name, GError **err);
/**
- * @brief A dbus interface exported for launching the pipeline's description corresponding to the given @name
+ * @brief An interface exported for launching the pipeline's description corresponding to the given @name
* @param[in] name A given name of the pipeline to launch
* @param[out] id Return an integer identifier for the launched pipeline
* @param[out] err Return location for error of NULL
* @return 0 on success, a negative error value if @err is set
*/
-gint ml_agent_dbus_interface_pipeline_launch (const gchar *name, gint64 *id, GError ** err);
+gint ml_agent_pipeline_launch (const gchar *name, gint64 *id, GError **err);
/**
- * @brief A dbus interface exported for changing the pipeline's state of the given @id to start
+ * @brief An interface exported for changing the pipeline's state of the given @id to start
* @param[in] id An identifier of the launched pipeline whose state would be changed to start
* @param[out] err Return location for error of NULL
* @return 0 on success, a negative error value if @err is set
*/
-gint ml_agent_dbus_interface_pipeline_start (gint64 id, GError ** err);
+gint ml_agent_pipeline_start (gint64 id, GError **err);
/**
- * @brief A dbus interface exported for changing the pipeline's state of the given @id to stop
+ * @brief An interface exported for changing the pipeline's state of the given @id to stop
* @param[in] id An identifier of the launched pipeline whose state would be changed to stop
* @param[out] err Return location for error of NULL
* @return 0 on success, a negative error value if @err is set
*/
-gint ml_agent_dbus_interface_pipeline_stop (gint64 id, GError ** err);
+gint ml_agent_pipeline_stop (gint64 id, GError **err);
/**
- * @brief A dbus interface exported for destroying a launched pipeline corresponding to the given @id
+ * @brief An interface exported for destroying a launched pipeline corresponding to the given @id
* @param[in] id An identifier of the launched pipeline that would be destroyed
* @param[out] err Return location for error of NULL
* @return 0 on success, a negative error value if @err is set
*/
-gint ml_agent_dbus_interface_pipeline_destroy (gint64 id, GError ** err);
+gint ml_agent_pipeline_destroy (gint64 id, GError **err);
/**
- * @brief A dbus interface exported for getting the pipeline's state of the given @id
+ * @brief An interface exported for getting the pipeline's state of the given @id
* @param[in] id An identifier of the launched pipeline that would be destroyed
- * @param[out] state Return location for the pieline's state
+ * @param[out] state Return location for the pipeline's state
* @param[out] err Return location for error of NULL
* @return 0 on success, a negative error value if @err is set
*/
-gint ml_agent_dbus_interface_pipeline_get_state (gint64 id, gint * state, GError ** err);
+gint ml_agent_pipeline_get_state (gint64 id, gint *state, GError **err);
/**
- * @brief A dbus interface exported for registering a model
+ * @brief An interface exported for registering a model
* @param[in] name A name indicating the model that would be registered
* @param[in] path A path that specifies the location of the model file
* @param[in] activate An initial activation state
* @param[out] err Return location for error of NULL
* @return 0 on success, a negative error value if @err is set
*/
-gint ml_agent_dbus_interface_model_register(const gchar *name, const gchar *path, const gboolean activate, const gchar *description, const gchar *app_info, guint *version, GError ** err);
+gint ml_agent_model_register(const gchar *name, const gchar *path, const gboolean activate, const gchar *description, const gchar *app_info, guint *version, GError **err);
/**
- * @brief A dbus interface exported for updating the description of the given model, @name
+ * @brief An interface exported for updating the description of the given model, @name
* @param[in] name A name indicating the model whose description would be updated
* @param[in] version A version for identifying the model whose description would be updated
* @param[in] description A new description to update the existing one
* @param[out] err Return location for error of NULL
* @return 0 on success, a negative error value if @err is set
*/
-gint ml_agent_dbus_interface_model_update_description (const gchar *name, const guint version, const gchar *description, GError ** err);
+gint ml_agent_model_update_description (const gchar *name, const guint version, const gchar *description, GError **err);
/**
- * @brief A dbus interface exported for activating the model of @name and @version
+ * @brief An interface exported for activating the model of @name and @version
* @param[in] name A name indicating a registered model
* @param[in] version A version of the given model, @name
* @param[out] err Return location for error of NULL
* @return 0 on success, a negative error value if @err is set
*/
-gint ml_agent_dbus_interface_model_activate(const gchar *name, const guint version, GError ** err);
+gint ml_agent_model_activate(const gchar *name, const guint version, GError **err);
/**
- * @brief A dbus interface exported for getting the description of the given model of @name and @version
+ * @brief An interface exported for getting the description of the given model of @name and @version
* @param[in] name A name indicating the model whose description would be get
* @param[in] version A version of the given model, @name
* @param[out] description Return location for the description of the given model of @name and @version
* @param[out] err Return location for error of NULL
* @return 0 on success, a negative error value if @err is set
*/
-gint ml_agent_dbus_interface_model_get(const gchar *name, const guint version, gchar ** description, GError ** err);
+gint ml_agent_model_get(const gchar *name, const guint version, gchar **description, GError **err);
/**
- * @brief A dbus interface exported for getting the description of the activated model of the given @name
+ * @brief An interface exported for getting the description of the activated model of the given @name
* @param[in] name A name indicating the model whose description would be get
* @param[out] description Return location for the description of an activated model of the given @name
* @param[out] err Return location for error of NULL
* @return 0 on success, a negative error value if @err is set
*/
-gint ml_agent_dbus_interface_model_get_activated(const gchar *name, gchar ** description, GError ** err);
+gint ml_agent_model_get_activated(const gchar *name, gchar **description, GError **err);
/**
- * @brief A dbus interface exported for getting the description of all the models corresponding to the given @name
+ * @brief An interface exported for getting the description of all the models corresponding to the given @name
* @param[in] name A name indicating the models whose description would be get
* @param[out] description Return location for the description of all the models corresponding to the given @name
* @param[out] err Return location for error of NULL
* @return 0 on success, a negative error value if @err is set
*/
-gint ml_agent_dbus_interface_model_get_all(const gchar *name, gchar ** description, GError ** err);
+gint ml_agent_model_get_all(const gchar *name, gchar **description, GError **err);
/**
- * @brief A dbus interface exported for removing the model of @name and @version
+ * @brief An interface exported for removing the model of @name and @version
* @param[in] name A name indicating the model that would be removed
* @param[in] version A version for identifying a specific model whose name is @name
* @param[in] description A new description to update the existing one
* @param[out] err Return location for error of NULL
* @return 0 on success, a negative error value if @err is set
*/
-gint ml_agent_dbus_interface_model_delete(const gchar *name, const guint version, GError ** err);
+gint ml_agent_model_delete(const gchar *name, const guint version, GError **err);
/**
- * @brief A dbus interface exported for adding the resource
+ * @brief An interface exported for adding the resource
* @param[in] name A name indicating the resource
* @param[in] path A path that specifies the location of the resource
* @param[in] description A stringified description of the resource
* @param[out] err Return location for error
* @return 0 on success, a negative error value if failed
*/
-gint ml_agent_dbus_interface_resource_add (const gchar *name, const gchar *path, const gchar *description, const gchar *app_info, GError **err);
+gint ml_agent_resource_add (const gchar *name, const gchar *path, const gchar *description, const gchar *app_info, GError **err);
/**
- * @brief A dbus interface exported for removing the resource with @name
+ * @brief An interface exported for removing the resource with @name
* @param[in] name A name indicating the resource
* @param[out] err Return location for error
* @return 0 on success, a negative error value if failed
*/
-gint ml_agent_dbus_interface_resource_delete (const gchar *name, GError **err);
+gint ml_agent_resource_delete (const gchar *name, GError **err);
/**
- * @brief A dbus interface exported for getting the description of the resource with @name
+ * @brief An interface exported for getting the description of the resource with @name
* @param[in] name A name indicating the resource
* @param[out] res_info Return location for the information of the resource
* @param[out] err Return location for error
* @return 0 on success, a negative error value if failed
*/
-gint ml_agent_dbus_interface_resource_get (const gchar *name, gchar **res_info, GError **err);
+gint ml_agent_resource_get (const gchar *name, gchar **res_info, GError **err);
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* __ML_AGENT_DBUS_INTERFACE_H__ */
+#endif /* __ML_AGENT_INTERFACE_H__ */
# Machine Learning Agent
# This file should be included when ml-service feature is enabled.
ml_agentd_incs = include_directories('.', 'include')
-ml_agentd_lib_common_srcs = files('modules.c', 'gdbus-util.c', 'ml-agent-dbus-interface.c',
+ml_agentd_lib_common_srcs = files('modules.c', 'gdbus-util.c', 'ml-agent-interface.c',
'pipeline-dbus-impl.cc', 'model-dbus-impl.cc', 'resource-dbus-impl.cc')
ml_agentd_lib_service_db_srcs = files('service-db.cc')
/**
- * @file ml-agent-dbus-interface.c
+ * @file ml-agent-interface.c
* @date 5 April 2023
- * @brief A set of exported DBus interfaces for managing pipelines and models
+ * @brief A set of exported ml-agent interfaces for managing pipelines, models, and other service.
* @see https://github.com/nnstreamer/api
* @author Wook Song <wook16.song@samsung.com>
* @bug No known bugs except for NYI items
#include <errno.h>
#include <glib.h>
-#include "include/ml-agent-dbus-interface.h"
+#include "include/ml-agent-interface.h"
#include "dbus-interface.h"
#include "model-dbus.h"
#include "pipeline-dbus.h"
typedef enum
{
- ML_AGENT_DBUS_SERVICE_PIPELINE = 0,
- ML_AGENT_DBUS_SERVICE_MODEL,
- ML_AGENT_DBUS_SERVICE_RESOURCE,
- ML_AGENT_DBUS_SERVICE_END
-} ml_agent_dbus_service_type_e;
+ ML_AGENT_SERVICE_PIPELINE = 0,
+ ML_AGENT_SERVICE_MODEL,
+ ML_AGENT_SERVICE_RESOURCE,
+ ML_AGENT_SERVICE_END
+} ml_agent_service_type_e;
-typedef gpointer ml_agent_dbus_proxy_h;
+typedef gpointer ml_agent_proxy_h;
/**
* @brief An internal helper to get the dbus proxy
*/
-static ml_agent_dbus_proxy_h
-_get_proxy_new_for_bus_sync (ml_agent_dbus_service_type_e type, GError ** err)
+static ml_agent_proxy_h
+_get_proxy_new_for_bus_sync (ml_agent_service_type_e type, GError ** err)
{
static const GBusType bus_types[] = { G_BUS_TYPE_SYSTEM, G_BUS_TYPE_SESSION };
static const size_t num_bus_types =
sizeof (bus_types) / sizeof (bus_types[0]);
- ml_agent_dbus_proxy_h *proxy = NULL;
+ ml_agent_proxy_h *proxy = NULL;
GError *_err = NULL;
size_t i;
switch (type) {
- case ML_AGENT_DBUS_SERVICE_PIPELINE:
+ case ML_AGENT_SERVICE_PIPELINE:
{
MachinelearningServicePipeline *mlsp;
break;
}
}
- proxy = (ml_agent_dbus_proxy_h *) mlsp;
+ proxy = (ml_agent_proxy_h *) mlsp;
break;
}
- case ML_AGENT_DBUS_SERVICE_MODEL:
+ case ML_AGENT_SERVICE_MODEL:
{
MachinelearningServiceModel *mlsm;
if (mlsm)
break;
}
- proxy = (ml_agent_dbus_proxy_h *) mlsm;
+ proxy = (ml_agent_proxy_h *) mlsm;
break;
}
- case ML_AGENT_DBUS_SERVICE_RESOURCE:
+ case ML_AGENT_SERVICE_RESOURCE:
{
MachinelearningServiceResource *mlsr;
if (mlsr)
break;
}
- proxy = (ml_agent_dbus_proxy_h *) mlsr;
+ proxy = (ml_agent_proxy_h *) mlsr;
break;
}
default:
}
/**
- * @brief A dbus interface exported for setting the description of a pipeline
+ * @brief An interface exported for setting the description of a pipeline
*/
gint
-ml_agent_dbus_interface_pipeline_set_description (const gchar * name,
+ml_agent_pipeline_set_description (const gchar * name,
const gchar * pipeline_desc, GError ** err)
{
MachinelearningServicePipeline *mlsp;
g_return_val_if_reached (-EINVAL);
}
- mlsp = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_PIPELINE, err);
+ mlsp = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_PIPELINE, err);
if (!mlsp) {
g_return_val_if_reached (-EIO);
}
}
/**
- * @brief A dbus interface exported for getting the pipeline's description corresponding to the given @name
+ * @brief An interface exported for getting the pipeline's description corresponding to the given @name
*/
gint
-ml_agent_dbus_interface_pipeline_get_description (const gchar * name,
+ml_agent_pipeline_get_description (const gchar * name,
gchar ** pipeline_desc, GError ** err)
{
MachinelearningServicePipeline *mlsp;
g_return_val_if_reached (-EINVAL);
}
- mlsp = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_PIPELINE, err);
+ mlsp = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_PIPELINE, err);
if (!mlsp) {
g_return_val_if_reached (-EIO);
}
}
/**
- * @brief A dbus interface exported for deletion of the pipeline's description corresponding to the given @name
+ * @brief An interface exported for deletion of the pipeline's description corresponding to the given @name
*/
gint
-ml_agent_dbus_interface_pipeline_delete (const gchar * name, GError ** err)
+ml_agent_pipeline_delete (const gchar * name, GError ** err)
{
MachinelearningServicePipeline *mlsp;
gboolean result;
g_return_val_if_reached (-EINVAL);
}
- mlsp = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_PIPELINE, err);
+ mlsp = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_PIPELINE, err);
if (!mlsp) {
g_return_val_if_reached (-EIO);
}
}
/**
- * @brief A dbus interface exported for launching the pipeline's description corresponding to the given @name
+ * @brief An interface exported for launching the pipeline's description corresponding to the given @name
*/
gint
-ml_agent_dbus_interface_pipeline_launch (const gchar * name, gint64 * id,
- GError ** err)
+ml_agent_pipeline_launch (const gchar * name, gint64 * id, GError ** err)
{
MachinelearningServicePipeline *mlsp;
gboolean result;
g_return_val_if_reached (-EINVAL);
}
- mlsp = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_PIPELINE, err);
+ mlsp = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_PIPELINE, err);
if (!mlsp) {
g_return_val_if_reached (-EIO);
}
}
/**
- * @brief A dbus interface exported for changing the pipeline's state of the given @id to start
+ * @brief An interface exported for changing the pipeline's state of the given @id to start
*/
gint
-ml_agent_dbus_interface_pipeline_start (gint64 id, GError ** err)
+ml_agent_pipeline_start (gint64 id, GError ** err)
{
MachinelearningServicePipeline *mlsp;
gboolean result;
gint ret;
- mlsp = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_PIPELINE, err);
+ mlsp = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_PIPELINE, err);
if (!mlsp) {
g_return_val_if_reached (-EIO);
}
}
/**
- * @brief A dbus interface exported for changing the pipeline's state of the given @id to stop
+ * @brief An interface exported for changing the pipeline's state of the given @id to stop
*/
gint
-ml_agent_dbus_interface_pipeline_stop (gint64 id, GError ** err)
+ml_agent_pipeline_stop (gint64 id, GError ** err)
{
MachinelearningServicePipeline *mlsp;
gboolean result;
gint ret;
- mlsp = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_PIPELINE, err);
+ mlsp = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_PIPELINE, err);
if (!mlsp) {
g_return_val_if_reached (-EIO);
}
}
/**
- * @brief A dbus interface exported for destroying a launched pipeline corresponding to the given @id
+ * @brief An interface exported for destroying a launched pipeline corresponding to the given @id
*/
gint
-ml_agent_dbus_interface_pipeline_destroy (gint64 id, GError ** err)
+ml_agent_pipeline_destroy (gint64 id, GError ** err)
{
MachinelearningServicePipeline *mlsp;
gboolean result;
gint ret;
- mlsp = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_PIPELINE, err);
+ mlsp = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_PIPELINE, err);
if (!mlsp) {
g_return_val_if_reached (-EIO);
}
}
/**
- * @brief A dbus interface exported for getting the pipeline's state of the given @id
+ * @brief An interface exported for getting the pipeline's state of the given @id
*/
gint
-ml_agent_dbus_interface_pipeline_get_state (gint64 id, gint * state,
- GError ** err)
+ml_agent_pipeline_get_state (gint64 id, gint * state, GError ** err)
{
MachinelearningServicePipeline *mlsp;
gboolean result;
gint ret;
- mlsp = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_PIPELINE, err);
+ mlsp = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_PIPELINE, err);
if (!mlsp) {
g_return_val_if_reached (-EIO);
}
return 0;
}
-
/**
- * @brief A dbus interface exported for registering a model
+ * @brief An interface exported for registering a model
*/
gint
-ml_agent_dbus_interface_model_register (const gchar * name, const gchar * path,
+ml_agent_model_register (const gchar * name, const gchar * path,
const gboolean activate, const gchar * description, const gchar * app_info,
guint * version, GError ** err)
{
gboolean result;
gint ret;
- mlsm = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_MODEL, err);
+ mlsm = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_MODEL, err);
if (!mlsm) {
g_return_val_if_reached (-EIO);
}
}
/**
- * @brief A dbus interface exported for updating the description of the given model, @name
+ * @brief An interface exported for updating the description of the given model, @name
*/
gint
-ml_agent_dbus_interface_model_update_description (const gchar * name,
+ml_agent_model_update_description (const gchar * name,
const guint version, const gchar * description, GError ** err)
{
MachinelearningServiceModel *mlsm;
gboolean result;
gint ret;
- mlsm = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_MODEL, err);
+ mlsm = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_MODEL, err);
if (!mlsm) {
g_return_val_if_reached (-EIO);
}
}
/**
- * @brief A dbus interface exported for activating the model of @name and @version
+ * @brief An interface exported for activating the model of @name and @version
*/
gint
-ml_agent_dbus_interface_model_activate (const gchar * name, const guint version,
- GError ** err)
+ml_agent_model_activate (const gchar * name, const guint version, GError ** err)
{
MachinelearningServiceModel *mlsm;
gboolean result;
gint ret;
- mlsm = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_MODEL, err);
+ mlsm = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_MODEL, err);
if (!mlsm) {
g_return_val_if_reached (-EIO);
}
}
/**
- * @brief A dbus interface exported for getting the description of the given model of @name and @version
+ * @brief An interface exported for getting the description of the given model of @name and @version
*/
gint
-ml_agent_dbus_interface_model_get (const gchar * name, const guint version,
+ml_agent_model_get (const gchar * name, const guint version,
gchar ** description, GError ** err)
{
MachinelearningServiceModel *mlsm;
gboolean result;
gint ret;
- mlsm = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_MODEL, err);
+ mlsm = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_MODEL, err);
if (!mlsm) {
g_return_val_if_reached (-EIO);
}
}
/**
- * @brief A dbus interface exported for getting the description of the activated model of the given @name
+ * @brief An interface exported for getting the description of the activated model of the given @name
*/
gint
-ml_agent_dbus_interface_model_get_activated (const gchar * name,
+ml_agent_model_get_activated (const gchar * name,
gchar ** description, GError ** err)
{
MachinelearningServiceModel *mlsm;
gboolean result;
gint ret;
- mlsm = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_MODEL, err);
+ mlsm = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_MODEL, err);
if (!mlsm) {
g_return_val_if_reached (-EIO);
}
}
/**
- * @brief A dbus interface exported for getting the description of all the models corresponding to the given @name
+ * @brief An interface exported for getting the description of all the models corresponding to the given @name
*/
gint
-ml_agent_dbus_interface_model_get_all (const gchar * name, gchar ** description,
- GError ** err)
+ml_agent_model_get_all (const gchar * name, gchar ** description, GError ** err)
{
MachinelearningServiceModel *mlsm;
gboolean result;
gint ret;
- mlsm = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_MODEL, err);
+ mlsm = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_MODEL, err);
if (!mlsm) {
g_return_val_if_reached (-EIO);
}
}
/**
- * @brief A dbus interface exported for removing the model of @name and @version
+ * @brief An interface exported for removing the model of @name and @version
*/
gint
-ml_agent_dbus_interface_model_delete (const gchar * name, const guint version,
- GError ** err)
+ml_agent_model_delete (const gchar * name, const guint version, GError ** err)
{
MachinelearningServiceModel *mlsm;
gboolean result;
gint ret;
- mlsm = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_MODEL, err);
+ mlsm = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_MODEL, err);
if (!mlsm) {
g_return_val_if_reached (-EIO);
}
}
/**
- * @brief A dbus interface exported for adding the resource
+ * @brief An interface exported for adding the resource
*/
gint
-ml_agent_dbus_interface_resource_add (const gchar * name, const gchar * path,
+ml_agent_resource_add (const gchar * name, const gchar * path,
const gchar * description, const gchar * app_info, GError ** err)
{
MachinelearningServiceResource *mlsr;
gboolean result;
gint ret;
- mlsr = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_RESOURCE, err);
+ mlsr = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_RESOURCE, err);
if (!mlsr) {
g_return_val_if_reached (-EIO);
}
}
/**
- * @brief A dbus interface exported for removing the resource with @name
+ * @brief An interface exported for removing the resource with @name
*/
gint
-ml_agent_dbus_interface_resource_delete (const gchar * name, GError ** err)
+ml_agent_resource_delete (const gchar * name, GError ** err)
{
MachinelearningServiceResource *mlsr;
gboolean result;
gint ret;
- mlsr = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_RESOURCE, err);
+ mlsr = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_RESOURCE, err);
if (!mlsr) {
g_return_val_if_reached (-EIO);
}
}
/**
- * @brief A dbus interface exported for getting the description of the resource with @name
+ * @brief An interface exported for getting the description of the resource with @name
*/
gint
-ml_agent_dbus_interface_resource_get (const gchar * name, gchar ** res_info,
- GError ** err)
+ml_agent_resource_get (const gchar * name, gchar ** res_info, GError ** err)
{
MachinelearningServiceResource *mlsr;
gboolean result;
gint ret;
- mlsr = _get_proxy_new_for_bus_sync (ML_AGENT_DBUS_SERVICE_RESOURCE, err);
+ mlsr = _get_proxy_new_for_bus_sync (ML_AGENT_SERVICE_RESOURCE, err);
if (!mlsr) {
g_return_val_if_reached (-EIO);
}
%manifest machine-learning-agent.manifest
%{_libdir}/libml-agentd.so
%{_libdir}/libml-agentd.a
-%{_includedir}/ml-agentd/ml-agent-dbus-interface.h
+%{_includedir}/ml-agentd/ml-agent-interface.h
%{_libdir}/pkgconfig/ml-agentd.pc
%files -n machine-learning-agent