summaryrefslogtreecommitdiffstats
path: root/src/software-dbus/sw-utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/software-dbus/sw-utils.h')
-rw-r--r--src/software-dbus/sw-utils.h47
1 files changed, 4 insertions, 43 deletions
diff --git a/src/software-dbus/sw-utils.h b/src/software-dbus/sw-utils.h
index a8a6565..d3475a8 100644
--- a/src/software-dbus/sw-utils.h
+++ b/src/software-dbus/sw-utils.h
@@ -26,41 +26,21 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <konkret/konkret.h>
#include <packagekit-glib2/packagekit.h>
-#include "globals.h"
+#include "openlmi.h"
#include "LMI_SoftwareIdentity.h"
-#define VER_STR_LEN 256
-#define ELEM_NAME_LEN 256
-#define INSTANCE_ID_LEN 282
-#define ERROR_MSG_LEN 512
-
#define PK_DETAILS_LIMIT 4999
#define EST_OF_INSTD_PKGS 1000
-#define SW_IDENTITY_CLASS_NAME "SoftwareIdentity"
-#define SYSTEM_SW_COLLECTION_CLASS_NAME "SystemSoftwareCollection"
-#define SW_IDENTITY_RESOURCE_CLASS_NAME "SoftwareIdentityResource"
-#define MEM_SW_COLL_CLASS_NAME "MemberOfSoftwareCollection"
-#define INST_SW_IDENTITY_CLASS_NAME "InstalledSoftwareIdentity"
-#define RESOURCE_FOR_SW_IDENTITY_CLASS_NAME "ResourceForSoftwareIdentity"
-
-#define COLLECTION_ATTR "Collection"
-#define MEMBER_ATTR "Member"
-#define SYSTEM_ATTR "System"
-#define INST_SW_ATTR "InstalledSoftware"
-#define AVAIL_SAP_ATTR "AvailableSAP"
-#define MNGD_ELEM_ATTR "ManagedElement"
-
-#define SW_IDENTITY_INSTANCE_ID_PREFIX ORGID ":" ORGID "_" SW_IDENTITY_CLASS_NAME ":"
+#define SW_IDENTITY_INSTANCE_ID_PREFIX LMI_ORGID ":" LMI_SoftwareIdentity_ClassName ":"
#define SW_IDENTITY_INSTANCE_ID_PREFIX_LEN 25
#define get_sw_pkg_from_sw_identity_op(cop, sw_pkg) \
create_sw_package_from_elem_name(get_elem_name_from_instance_id(\
- get_str_property_from_op(cop, "InstanceID")), sw_pkg)
+ lmi_get_string_property_from_objectpath(cop, "InstanceID")), sw_pkg)
const char *provider_name;
const ConfigEntry *provider_config_defaults;
@@ -190,7 +170,7 @@ void get_pk_packages(PkBitfield filters, GPtrArray **garray, char *error_msg,
* @param task_p if supplied, this task will be used when querying PackageKit;
* performance optimization, can be NULL
*/
-void get_pk_det_from_array(const char **values_p, GPtrArray **garray,
+void get_pk_det_from_array(char **values_p, GPtrArray **garray,
PkTask *task_p);
/*
@@ -339,23 +319,4 @@ const char *get_elem_name_from_instance_id(const char *instance_id);
void create_instance_id(const char *class_name, const char *id,
char *instance_id, const unsigned instance_id_len);
-/*
- * Get string property from Object Path.
- * @param o Object Path
- * @param prop property
- * @return string value of property
- */
-const char *get_str_property_from_op(const CMPIObjectPath *o, const char *prop);
-
-/*
- * Check whether cm_class is type of type. Takes inheritance into account.
- * @param cb CMPI Broker
- * @param ns namespace
- * @param cm_class
- * @param type; can be NULL, in which case the comparison will succeed
- * @return 1 if cm_class is type of type, 0 otherwise
- */
-short cm_class_is_a(const CMPIBroker *cb, const char *ns, const char *cm_class,
- const char *type);
-
#endif /* SW_UTILS_H_ */