summaryrefslogtreecommitdiffstats
path: root/src/power
diff options
context:
space:
mode:
authorRadek Novacek <rnovacek@redhat.com>2012-07-31 10:56:04 +0200
committerRadek Novacek <rnovacek@redhat.com>2012-07-31 10:56:04 +0200
commit2c830a0bafaa573f005246195071076dac468ccd (patch)
tree876f19d4863950913e882445573dfe31b960538b /src/power
parent81550f470d8224582867054a221445626393d58b (diff)
downloadopenlmi-providers-2c830a0bafaa573f005246195071076dac468ccd.tar.gz
openlmi-providers-2c830a0bafaa573f005246195071076dac468ccd.tar.xz
openlmi-providers-2c830a0bafaa573f005246195071076dac468ccd.zip
Replace all Linux_ prefixes with Cura_ prefixes.
Diffstat (limited to 'src/power')
-rw-r--r--src/power/CMakeLists.txt2
-rw-r--r--src/power/Cura_AssociatedPowerManagementServiceProvider.c (renamed from src/power/Linux_AssociatedPowerManagementServiceProvider.c)96
-rw-r--r--src/power/Cura_ConcreteJobProvider.c (renamed from src/power/Linux_ConcreteJobProvider.c)68
-rw-r--r--src/power/Cura_ElementCapabilitiesProvider.c (renamed from src/power/Linux_ElementCapabilitiesProvider.c)80
-rw-r--r--src/power/Cura_HostedServiceProvider.c (renamed from src/power/Linux_HostedServiceProvider.c)74
-rw-r--r--src/power/Cura_PowerManagementCapabilitiesProvider.c (renamed from src/power/Linux_PowerManagementCapabilitiesProvider.c)66
-rw-r--r--src/power/Cura_PowerManagementServiceProvider.c (renamed from src/power/Linux_PowerManagementServiceProvider.c)88
-rw-r--r--src/power/power.c96
8 files changed, 285 insertions, 285 deletions
diff --git a/src/power/CMakeLists.txt b/src/power/CMakeLists.txt
index f30cb87..a129b98 100644
--- a/src/power/CMakeLists.txt
+++ b/src/power/CMakeLists.txt
@@ -1,7 +1,7 @@
set(PROVIDER_NAME PowerManagement)
set(LIBRARY_NAME cmpi${PROVIDER_NAME})
-set(MOF Linux_PowerManagement.mof)
+set(MOF Cura_PowerManagement.mof)
set(provider_SRCS
power.c
diff --git a/src/power/Linux_AssociatedPowerManagementServiceProvider.c b/src/power/Cura_AssociatedPowerManagementServiceProvider.c
index d6d6454..82c9ea5 100644
--- a/src/power/Linux_AssociatedPowerManagementServiceProvider.c
+++ b/src/power/Cura_AssociatedPowerManagementServiceProvider.c
@@ -1,6 +1,6 @@
-#include "Linux_AssociatedPowerManagementService.h"
-#include "Linux_PowerManagementService.h"
+#include "Cura_AssociatedPowerManagementService.h"
+#include "Cura_PowerManagementService.h"
#include "CIM_ComputerSystem.h"
#include "power.h"
@@ -9,17 +9,17 @@
static const CMPIBroker* _cb;
-static void Linux_AssociatedPowerManagementServiceInitialize(CMPIInstanceMI *mi)
+static void Cura_AssociatedPowerManagementServiceInitialize(CMPIInstanceMI *mi)
{
mi->hdl = power_ref(_cb);
}
-static void Linux_AssociatedPowerManagementServiceAssociationInitialize(CMPIAssociationMI *mi)
+static void Cura_AssociatedPowerManagementServiceAssociationInitialize(CMPIAssociationMI *mi)
{
mi->hdl = power_ref(_cb);
}
-static CMPIStatus Linux_AssociatedPowerManagementServiceCleanup(
+static CMPIStatus Cura_AssociatedPowerManagementServiceCleanup(
CMPIInstanceMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -29,7 +29,7 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_AssociatedPowerManagementServiceEnumInstanceNames(
+static CMPIStatus Cura_AssociatedPowerManagementServiceEnumInstanceNames(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -39,7 +39,7 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceEnumInstanceNames(
_cb, mi, cc, cr, cop);
}
-static CMPIStatus Linux_AssociatedPowerManagementServiceEnumInstances(
+static CMPIStatus Cura_AssociatedPowerManagementServiceEnumInstances(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -49,8 +49,8 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceEnumInstances(
CMPIStatus rc;
const char *ns = KNameSpace(cop);
- Linux_AssociatedPowerManagementService w;
- Linux_AssociatedPowerManagementService_Init(&w, _cb, ns);
+ Cura_AssociatedPowerManagementService w;
+ Cura_AssociatedPowerManagementService_Init(&w, _cb, ns);
CIM_ComputerSystemRef computerSystemRef;
CIM_ComputerSystemRef_Init(&computerSystemRef, _cb, ns);
@@ -58,32 +58,32 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceEnumInstances(
CIM_ComputerSystemRef_Set_CreationClassName(&computerSystemRef, get_system_creation_class_name());
CMPIObjectPath *computerSystemOP = CIM_ComputerSystemRef_ToObjectPath(&computerSystemRef, &rc);
computerSystemOP->ft->setClassName(computerSystemOP, get_system_creation_class_name());
- Linux_AssociatedPowerManagementService_SetObjectPath_UserOfService(&w, computerSystemOP);
+ Cura_AssociatedPowerManagementService_SetObjectPath_UserOfService(&w, computerSystemOP);
- Linux_PowerManagementServiceRef powerManagementServiceRef;
- Linux_PowerManagementServiceRef_Init(&powerManagementServiceRef, _cb, ns);
- Linux_PowerManagementServiceRef_Set_Name(&powerManagementServiceRef, get_system_name());
- Linux_PowerManagementServiceRef_Set_SystemName(&powerManagementServiceRef, get_system_name());
- Linux_PowerManagementServiceRef_Set_CreationClassName(&powerManagementServiceRef, "Linux_PowerManagementService");
- Linux_PowerManagementServiceRef_Set_SystemCreationClassName(&powerManagementServiceRef, get_system_creation_class_name());
- Linux_AssociatedPowerManagementService_Set_ServiceProvided(&w, &powerManagementServiceRef);
+ Cura_PowerManagementServiceRef powerManagementServiceRef;
+ Cura_PowerManagementServiceRef_Init(&powerManagementServiceRef, _cb, ns);
+ Cura_PowerManagementServiceRef_Set_Name(&powerManagementServiceRef, get_system_name());
+ Cura_PowerManagementServiceRef_Set_SystemName(&powerManagementServiceRef, get_system_name());
+ Cura_PowerManagementServiceRef_Set_CreationClassName(&powerManagementServiceRef, "Cura_PowerManagementService");
+ Cura_PowerManagementServiceRef_Set_SystemCreationClassName(&powerManagementServiceRef, get_system_creation_class_name());
+ Cura_AssociatedPowerManagementService_Set_ServiceProvided(&w, &powerManagementServiceRef);
int count;
unsigned short *list = power_available_requested_power_states(mi->hdl, &count);
- Linux_AssociatedPowerManagementService_Init_AvailableRequestedPowerStates(&w, count);
+ Cura_AssociatedPowerManagementService_Init_AvailableRequestedPowerStates(&w, count);
for (int i = 0; i < count; i++) {
- Linux_AssociatedPowerManagementService_Set_AvailableRequestedPowerStates(&w, i, list[i]);
+ Cura_AssociatedPowerManagementService_Set_AvailableRequestedPowerStates(&w, i, list[i]);
}
- Linux_AssociatedPowerManagementService_Set_TransitioningToPowerState(&w, power_transitioning_to_power_state(mi->hdl));
- Linux_AssociatedPowerManagementService_Set_PowerState(&w, 2);
- Linux_AssociatedPowerManagementService_Set_RequestedPowerState(&w, power_requested_power_state(mi->hdl));
+ Cura_AssociatedPowerManagementService_Set_TransitioningToPowerState(&w, power_transitioning_to_power_state(mi->hdl));
+ Cura_AssociatedPowerManagementService_Set_PowerState(&w, 2);
+ Cura_AssociatedPowerManagementService_Set_RequestedPowerState(&w, power_requested_power_state(mi->hdl));
KReturnInstance(cr, w);
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_AssociatedPowerManagementServiceGetInstance(
+static CMPIStatus Cura_AssociatedPowerManagementServiceGetInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -94,7 +94,7 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceGetInstance(
_cb, mi, cc, cr, cop, properties);
}
-static CMPIStatus Linux_AssociatedPowerManagementServiceCreateInstance(
+static CMPIStatus Cura_AssociatedPowerManagementServiceCreateInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -104,7 +104,7 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceCreateInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_AssociatedPowerManagementServiceModifyInstance(
+static CMPIStatus Cura_AssociatedPowerManagementServiceModifyInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -115,7 +115,7 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceModifyInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_AssociatedPowerManagementServiceDeleteInstance(
+static CMPIStatus Cura_AssociatedPowerManagementServiceDeleteInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -124,7 +124,7 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceDeleteInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_AssociatedPowerManagementServiceExecQuery(
+static CMPIStatus Cura_AssociatedPowerManagementServiceExecQuery(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -135,7 +135,7 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceExecQuery(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_AssociatedPowerManagementServiceAssociationCleanup(
+static CMPIStatus Cura_AssociatedPowerManagementServiceAssociationCleanup(
CMPIAssociationMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -146,7 +146,7 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceAssociationCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_AssociatedPowerManagementServiceAssociators(
+static CMPIStatus Cura_AssociatedPowerManagementServiceAssociators(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -158,7 +158,7 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceAssociators(
const char** properties)
{
if (!assocClass) {
- assocClass = "Linux_AssociatedPowerManagementService";
+ assocClass = "Cura_AssociatedPowerManagementService";
}
return KDefaultAssociators(
@@ -167,7 +167,7 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceAssociators(
cc,
cr,
cop,
- Linux_AssociatedPowerManagementService_ClassName,
+ Cura_AssociatedPowerManagementService_ClassName,
assocClass,
resultClass,
role,
@@ -175,7 +175,7 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceAssociators(
properties);
}
-static CMPIStatus Linux_AssociatedPowerManagementServiceAssociatorNames(
+static CMPIStatus Cura_AssociatedPowerManagementServiceAssociatorNames(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -186,7 +186,7 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceAssociatorNames(
const char* resultRole)
{
if (!assocClass) {
- assocClass = "Linux_AssociatedPowerManagementService";
+ assocClass = "Cura_AssociatedPowerManagementService";
}
return KDefaultAssociatorNames(
@@ -195,14 +195,14 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceAssociatorNames(
cc,
cr,
cop,
- Linux_AssociatedPowerManagementService_ClassName,
+ Cura_AssociatedPowerManagementService_ClassName,
assocClass,
resultClass,
role,
resultRole);
}
-static CMPIStatus Linux_AssociatedPowerManagementServiceReferences(
+static CMPIStatus Cura_AssociatedPowerManagementServiceReferences(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -212,7 +212,7 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceReferences(
const char** properties)
{
if (!assocClass) {
- assocClass = "Linux_AssociatedPowerManagementService";
+ assocClass = "Cura_AssociatedPowerManagementService";
}
return KDefaultReferences(
@@ -221,13 +221,13 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceReferences(
cc,
cr,
cop,
- Linux_AssociatedPowerManagementService_ClassName,
+ Cura_AssociatedPowerManagementService_ClassName,
assocClass,
role,
properties);
}
-static CMPIStatus Linux_AssociatedPowerManagementServiceReferenceNames(
+static CMPIStatus Cura_AssociatedPowerManagementServiceReferenceNames(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -236,7 +236,7 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceReferenceNames(
const char* role)
{
if (!assocClass) {
- assocClass = "Linux_AssociatedPowerManagementService";
+ assocClass = "Cura_AssociatedPowerManagementService";
}
return KDefaultReferenceNames(
@@ -245,25 +245,25 @@ static CMPIStatus Linux_AssociatedPowerManagementServiceReferenceNames(
cc,
cr,
cop,
- Linux_AssociatedPowerManagementService_ClassName,
+ Cura_AssociatedPowerManagementService_ClassName,
assocClass,
role);
}
CMInstanceMIStub(
- Linux_AssociatedPowerManagementService,
- Linux_AssociatedPowerManagementService,
+ Cura_AssociatedPowerManagementService,
+ Cura_AssociatedPowerManagementService,
_cb,
- Linux_AssociatedPowerManagementServiceInitialize(&mi))
+ Cura_AssociatedPowerManagementServiceInitialize(&mi))
CMAssociationMIStub(
- Linux_AssociatedPowerManagementService,
- Linux_AssociatedPowerManagementService,
+ Cura_AssociatedPowerManagementService,
+ Cura_AssociatedPowerManagementService,
_cb,
- Linux_AssociatedPowerManagementServiceAssociationInitialize(&mi))
+ Cura_AssociatedPowerManagementServiceAssociationInitialize(&mi))
KONKRET_REGISTRATION(
"root/cimv2",
- "Linux_AssociatedPowerManagementService",
- "Linux_AssociatedPowerManagementService",
+ "Cura_AssociatedPowerManagementService",
+ "Cura_AssociatedPowerManagementService",
"instance association")
diff --git a/src/power/Linux_ConcreteJobProvider.c b/src/power/Cura_ConcreteJobProvider.c
index 96176fa..cf919d4 100644
--- a/src/power/Linux_ConcreteJobProvider.c
+++ b/src/power/Cura_ConcreteJobProvider.c
@@ -1,23 +1,23 @@
#include <konkret/konkret.h>
#include <stdint.h>
-#include "Linux_ConcreteJob.h"
+#include "Cura_ConcreteJob.h"
#include "globals.h"
static const CMPIBroker* _cb = NULL;
#include "power.h"
-static void Linux_ConcreteJobInitializeInstance(CMPIInstanceMI *mi)
+static void Cura_ConcreteJobInitializeInstance(CMPIInstanceMI *mi)
{
mi->hdl = power_ref(_cb);
}
-static void Linux_ConcreteJobInitializeMethod(CMPIMethodMI *mi)
+static void Cura_ConcreteJobInitializeMethod(CMPIMethodMI *mi)
{
mi->hdl = power_ref(_cb);
}
-static CMPIStatus Linux_ConcreteJobCleanup(
+static CMPIStatus Cura_ConcreteJobCleanup(
CMPIInstanceMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -30,7 +30,7 @@ static CMPIStatus Linux_ConcreteJobCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_ConcreteJobEnumInstanceNames(
+static CMPIStatus Cura_ConcreteJobEnumInstanceNames(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -40,7 +40,7 @@ static CMPIStatus Linux_ConcreteJobEnumInstanceNames(
_cb, mi, cc, cr, cop);
}
-static CMPIStatus Linux_ConcreteJobEnumInstances(
+static CMPIStatus Cura_ConcreteJobEnumInstances(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -55,12 +55,12 @@ static CMPIStatus Linux_ConcreteJobEnumInstances(
while (plist) {
powerStateChangeJob = plist->data;
- Linux_ConcreteJob concreteJob;
- Linux_ConcreteJob_Init(&concreteJob, _cb, ns);
- Linux_ConcreteJob_Set_InstanceID(&concreteJob, "Linux_PowerStateChange_ConcreteJob:123"); // TODO: unique ID
- Linux_ConcreteJob_Set_JobState(&concreteJob, job_state(powerStateChangeJob));
- Linux_ConcreteJob_Set_TimeOfLastStateChange(&concreteJob, CMNewDateTimeFromBinary(_cb, ((uint64_t) job_timeOfLastChange(powerStateChangeJob)) * 1000000, 0, &status));
- //Linux_ConcreteJob_Set_
+ Cura_ConcreteJob concreteJob;
+ Cura_ConcreteJob_Init(&concreteJob, _cb, ns);
+ Cura_ConcreteJob_Set_InstanceID(&concreteJob, "Cura_PowerStateChange_ConcreteJob:123"); // TODO: unique ID
+ Cura_ConcreteJob_Set_JobState(&concreteJob, job_state(powerStateChangeJob));
+ Cura_ConcreteJob_Set_TimeOfLastStateChange(&concreteJob, CMNewDateTimeFromBinary(_cb, ((uint64_t) job_timeOfLastChange(powerStateChangeJob)) * 1000000, 0, &status));
+ //Cura_ConcreteJob_Set_
KReturnInstance(cr, concreteJob);
plist = g_list_next(plist);
}
@@ -68,7 +68,7 @@ static CMPIStatus Linux_ConcreteJobEnumInstances(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_ConcreteJobGetInstance(
+static CMPIStatus Cura_ConcreteJobGetInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -79,7 +79,7 @@ static CMPIStatus Linux_ConcreteJobGetInstance(
_cb, mi, cc, cr, cop, properties);
}
-static CMPIStatus Linux_ConcreteJobCreateInstance(
+static CMPIStatus Cura_ConcreteJobCreateInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -90,7 +90,7 @@ static CMPIStatus Linux_ConcreteJobCreateInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_ConcreteJobModifyInstance(
+static CMPIStatus Cura_ConcreteJobModifyInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -101,7 +101,7 @@ static CMPIStatus Linux_ConcreteJobModifyInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_ConcreteJobDeleteInstance(
+static CMPIStatus Cura_ConcreteJobDeleteInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -110,7 +110,7 @@ static CMPIStatus Linux_ConcreteJobDeleteInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_ConcreteJobExecQuery(
+static CMPIStatus Cura_ConcreteJobExecQuery(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -122,12 +122,12 @@ static CMPIStatus Linux_ConcreteJobExecQuery(
}
CMInstanceMIStub(
- Linux_ConcreteJob,
- Linux_ConcreteJob,
+ Cura_ConcreteJob,
+ Cura_ConcreteJob,
_cb,
- Linux_ConcreteJobInitializeInstance(&mi))
+ Cura_ConcreteJobInitializeInstance(&mi))
-static CMPIStatus Linux_ConcreteJobMethodCleanup(
+static CMPIStatus Cura_ConcreteJobMethodCleanup(
CMPIMethodMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -136,7 +136,7 @@ static CMPIStatus Linux_ConcreteJobMethodCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_ConcreteJobInvokeMethod(
+static CMPIStatus Cura_ConcreteJobInvokeMethod(
CMPIMethodMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -145,21 +145,21 @@ static CMPIStatus Linux_ConcreteJobInvokeMethod(
const CMPIArgs* in,
CMPIArgs* out)
{
- return Linux_ConcreteJob_DispatchMethod(
+ return Cura_ConcreteJob_DispatchMethod(
_cb, mi, cc, cr, cop, meth, in, out);
}
CMMethodMIStub(
- Linux_ConcreteJob,
- Linux_ConcreteJob,
+ Cura_ConcreteJob,
+ Cura_ConcreteJob,
_cb,
- Linux_ConcreteJobInitializeMethod(&mi))
+ Cura_ConcreteJobInitializeMethod(&mi))
-KUint32 Linux_ConcreteJob_KillJob(
+KUint32 Cura_ConcreteJob_KillJob(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Linux_ConcreteJobRef* self,
+ const Cura_ConcreteJobRef* self,
const KBoolean* DeleteOnKill,
CMPIStatus* status)
{
@@ -169,11 +169,11 @@ KUint32 Linux_ConcreteJob_KillJob(
return result;
}
-KUint32 Linux_ConcreteJob_RequestStateChange(
+KUint32 Cura_ConcreteJob_RequestStateChange(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Linux_ConcreteJobRef* self,
+ const Cura_ConcreteJobRef* self,
const KUint16* RequestedState,
const KDateTime* TimeoutPeriod,
CMPIStatus* status)
@@ -184,11 +184,11 @@ KUint32 Linux_ConcreteJob_RequestStateChange(
return result;
}
-KUint32 Linux_ConcreteJob_GetError(
+KUint32 Cura_ConcreteJob_GetError(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Linux_ConcreteJobRef* self,
+ const Cura_ConcreteJobRef* self,
KString* Error,
CMPIStatus* status)
{
@@ -200,6 +200,6 @@ KUint32 Linux_ConcreteJob_GetError(
KONKRET_REGISTRATION(
"root/cimv2",
- "Linux_ConcreteJob",
- "Linux_ConcreteJob",
+ "Cura_ConcreteJob",
+ "Cura_ConcreteJob",
"instance method")
diff --git a/src/power/Linux_ElementCapabilitiesProvider.c b/src/power/Cura_ElementCapabilitiesProvider.c
index ee09969..0208630 100644
--- a/src/power/Linux_ElementCapabilitiesProvider.c
+++ b/src/power/Cura_ElementCapabilitiesProvider.c
@@ -1,14 +1,14 @@
#include <konkret/konkret.h>
-#include "Linux_ElementCapabilities.h"
+#include "Cura_ElementCapabilities.h"
#include "globals.h"
static const CMPIBroker* _cb;
-static void Linux_ElementCapabilitiesInitialize()
+static void Cura_ElementCapabilitiesInitialize()
{
}
-static CMPIStatus Linux_ElementCapabilitiesCleanup(
+static CMPIStatus Cura_ElementCapabilitiesCleanup(
CMPIInstanceMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -16,7 +16,7 @@ static CMPIStatus Linux_ElementCapabilitiesCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_ElementCapabilitiesEnumInstanceNames(
+static CMPIStatus Cura_ElementCapabilitiesEnumInstanceNames(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -26,7 +26,7 @@ static CMPIStatus Linux_ElementCapabilitiesEnumInstanceNames(
_cb, mi, cc, cr, cop);
}
-static CMPIStatus Linux_ElementCapabilitiesEnumInstances(
+static CMPIStatus Cura_ElementCapabilitiesEnumInstances(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -35,29 +35,29 @@ static CMPIStatus Linux_ElementCapabilitiesEnumInstances(
{
const char *ns = KNameSpace(cop);
- Linux_ElementCapabilities w;
- Linux_ElementCapabilities_Init(&w, _cb, ns);
+ Cura_ElementCapabilities w;
+ Cura_ElementCapabilities_Init(&w, _cb, ns);
- Linux_PowerManagementServiceRef powerManagementServiceRef;
- Linux_PowerManagementServiceRef_Init(&powerManagementServiceRef, _cb, ns);
- Linux_PowerManagementServiceRef_Set_Name(&powerManagementServiceRef, get_system_name());
- Linux_PowerManagementServiceRef_Set_SystemName(&powerManagementServiceRef, get_system_name());
- Linux_PowerManagementServiceRef_Set_CreationClassName(&powerManagementServiceRef, "Linux_PowerManagementService");
- Linux_PowerManagementServiceRef_Set_SystemCreationClassName(&powerManagementServiceRef, get_system_creation_class_name());
+ Cura_PowerManagementServiceRef powerManagementServiceRef;
+ Cura_PowerManagementServiceRef_Init(&powerManagementServiceRef, _cb, ns);
+ Cura_PowerManagementServiceRef_Set_Name(&powerManagementServiceRef, get_system_name());
+ Cura_PowerManagementServiceRef_Set_SystemName(&powerManagementServiceRef, get_system_name());
+ Cura_PowerManagementServiceRef_Set_CreationClassName(&powerManagementServiceRef, "Cura_PowerManagementService");
+ Cura_PowerManagementServiceRef_Set_SystemCreationClassName(&powerManagementServiceRef, get_system_creation_class_name());
- Linux_ElementCapabilities_Set_ManagedElement(&w, &powerManagementServiceRef);
+ Cura_ElementCapabilities_Set_ManagedElement(&w, &powerManagementServiceRef);
- Linux_PowerManagementCapabilitiesRef powerManagementCapabilitiesRef;
- Linux_PowerManagementCapabilitiesRef_Init(&powerManagementCapabilitiesRef, _cb, ns);
- Linux_PowerManagementCapabilitiesRef_Set_InstanceID(&powerManagementCapabilitiesRef, "RedHat:PowerManagementCapabilities");
+ Cura_PowerManagementCapabilitiesRef powerManagementCapabilitiesRef;
+ Cura_PowerManagementCapabilitiesRef_Init(&powerManagementCapabilitiesRef, _cb, ns);
+ Cura_PowerManagementCapabilitiesRef_Set_InstanceID(&powerManagementCapabilitiesRef, "RedHat:PowerManagementCapabilities");
- Linux_ElementCapabilities_Set_Capabilities(&w, &powerManagementCapabilitiesRef);
+ Cura_ElementCapabilities_Set_Capabilities(&w, &powerManagementCapabilitiesRef);
KReturnInstance(cr, w);
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_ElementCapabilitiesGetInstance(
+static CMPIStatus Cura_ElementCapabilitiesGetInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -68,7 +68,7 @@ static CMPIStatus Linux_ElementCapabilitiesGetInstance(
_cb, mi, cc, cr, cop, properties);
}
-static CMPIStatus Linux_ElementCapabilitiesCreateInstance(
+static CMPIStatus Cura_ElementCapabilitiesCreateInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -78,7 +78,7 @@ static CMPIStatus Linux_ElementCapabilitiesCreateInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_ElementCapabilitiesModifyInstance(
+static CMPIStatus Cura_ElementCapabilitiesModifyInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -89,7 +89,7 @@ static CMPIStatus Linux_ElementCapabilitiesModifyInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_ElementCapabilitiesDeleteInstance(
+static CMPIStatus Cura_ElementCapabilitiesDeleteInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -98,7 +98,7 @@ static CMPIStatus Linux_ElementCapabilitiesDeleteInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_ElementCapabilitiesExecQuery(
+static CMPIStatus Cura_ElementCapabilitiesExecQuery(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -109,7 +109,7 @@ static CMPIStatus Linux_ElementCapabilitiesExecQuery(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_ElementCapabilitiesAssociationCleanup(
+static CMPIStatus Cura_ElementCapabilitiesAssociationCleanup(
CMPIAssociationMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -117,7 +117,7 @@ static CMPIStatus Linux_ElementCapabilitiesAssociationCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_ElementCapabilitiesAssociators(
+static CMPIStatus Cura_ElementCapabilitiesAssociators(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -134,7 +134,7 @@ static CMPIStatus Linux_ElementCapabilitiesAssociators(
cc,
cr,
cop,
- Linux_ElementCapabilities_ClassName,
+ Cura_ElementCapabilities_ClassName,
assocClass,
resultClass,
role,
@@ -142,7 +142,7 @@ static CMPIStatus Linux_ElementCapabilitiesAssociators(
properties);
}
-static CMPIStatus Linux_ElementCapabilitiesAssociatorNames(
+static CMPIStatus Cura_ElementCapabilitiesAssociatorNames(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -158,14 +158,14 @@ static CMPIStatus Linux_ElementCapabilitiesAssociatorNames(
cc,
cr,
cop,
- Linux_ElementCapabilities_ClassName,
+ Cura_ElementCapabilities_ClassName,
assocClass,
resultClass,
role,
resultRole);
}
-static CMPIStatus Linux_ElementCapabilitiesReferences(
+static CMPIStatus Cura_ElementCapabilitiesReferences(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -180,13 +180,13 @@ static CMPIStatus Linux_ElementCapabilitiesReferences(
cc,
cr,
cop,
- Linux_ElementCapabilities_ClassName,
+ Cura_ElementCapabilities_ClassName,
assocClass,
role,
properties);
}
-static CMPIStatus Linux_ElementCapabilitiesReferenceNames(
+static CMPIStatus Cura_ElementCapabilitiesReferenceNames(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -200,25 +200,25 @@ static CMPIStatus Linux_ElementCapabilitiesReferenceNames(
cc,
cr,
cop,
- Linux_ElementCapabilities_ClassName,
+ Cura_ElementCapabilities_ClassName,
assocClass,
role);
}
CMInstanceMIStub(
- Linux_ElementCapabilities,
- Linux_ElementCapabilities,
+ Cura_ElementCapabilities,
+ Cura_ElementCapabilities,
_cb,
- Linux_ElementCapabilitiesInitialize())
+ Cura_ElementCapabilitiesInitialize())
CMAssociationMIStub(
- Linux_ElementCapabilities,
- Linux_ElementCapabilities,
+ Cura_ElementCapabilities,
+ Cura_ElementCapabilities,
_cb,
- Linux_ElementCapabilitiesInitialize())
+ Cura_ElementCapabilitiesInitialize())
KONKRET_REGISTRATION(
"root/cimv2",
- "Linux_ElementCapabilities",
- "Linux_ElementCapabilities",
+ "Cura_ElementCapabilities",
+ "Cura_ElementCapabilities",
"instance association")
diff --git a/src/power/Linux_HostedServiceProvider.c b/src/power/Cura_HostedServiceProvider.c
index 7b50150..d2023e9 100644
--- a/src/power/Linux_HostedServiceProvider.c
+++ b/src/power/Cura_HostedServiceProvider.c
@@ -1,17 +1,17 @@
#include <cmpimacs.h>
#include <konkret/konkret.h>
-#include "Linux_HostedService.h"
+#include "Cura_HostedService.h"
#include "globals.h"
static const CMPIBroker* _cb;
-static void Linux_HostedServiceInitialize()
+static void Cura_HostedServiceInitialize()
{
}
-static CMPIStatus Linux_HostedServiceCleanup(
+static CMPIStatus Cura_HostedServiceCleanup(
CMPIInstanceMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -19,7 +19,7 @@ static CMPIStatus Linux_HostedServiceCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_HostedServiceEnumInstanceNames(
+static CMPIStatus Cura_HostedServiceEnumInstanceNames(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -29,7 +29,7 @@ static CMPIStatus Linux_HostedServiceEnumInstanceNames(
_cb, mi, cc, cr, cop);
}
-static CMPIStatus Linux_HostedServiceEnumInstances(
+static CMPIStatus Cura_HostedServiceEnumInstances(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -39,8 +39,8 @@ static CMPIStatus Linux_HostedServiceEnumInstances(
CMPIStatus rc;
const char *ns = KNameSpace(cop);
- Linux_HostedService w;
- Linux_HostedService_Init(&w, _cb, ns);
+ Cura_HostedService w;
+ Cura_HostedService_Init(&w, _cb, ns);
CIM_ComputerSystemRef computerSystemRef;
CIM_ComputerSystemRef_Init(&computerSystemRef, _cb, ns);
@@ -48,21 +48,21 @@ static CMPIStatus Linux_HostedServiceEnumInstances(
CIM_ComputerSystemRef_Set_CreationClassName(&computerSystemRef, get_system_creation_class_name());
CMPIObjectPath *computerSystemOP = CIM_ComputerSystemRef_ToObjectPath(&computerSystemRef, &rc);
computerSystemOP->ft->setClassName(computerSystemOP, get_system_creation_class_name());
- Linux_HostedService_SetObjectPath_Antecedent(&w, computerSystemOP);
+ Cura_HostedService_SetObjectPath_Antecedent(&w, computerSystemOP);
- Linux_PowerManagementServiceRef powerManagementServiceRef;
- Linux_PowerManagementServiceRef_Init(&powerManagementServiceRef, _cb, ns);
- Linux_PowerManagementServiceRef_Set_Name(&powerManagementServiceRef, get_system_name());
- Linux_PowerManagementServiceRef_Set_SystemName(&powerManagementServiceRef, get_system_name());
- Linux_PowerManagementServiceRef_Set_CreationClassName(&powerManagementServiceRef, "Linux_PowerManagementService");
- Linux_PowerManagementServiceRef_Set_SystemCreationClassName(&powerManagementServiceRef, get_system_creation_class_name());
- Linux_HostedService_Set_Dependent(&w, &powerManagementServiceRef);
+ Cura_PowerManagementServiceRef powerManagementServiceRef;
+ Cura_PowerManagementServiceRef_Init(&powerManagementServiceRef, _cb, ns);
+ Cura_PowerManagementServiceRef_Set_Name(&powerManagementServiceRef, get_system_name());
+ Cura_PowerManagementServiceRef_Set_SystemName(&powerManagementServiceRef, get_system_name());
+ Cura_PowerManagementServiceRef_Set_CreationClassName(&powerManagementServiceRef, "Cura_PowerManagementService");
+ Cura_PowerManagementServiceRef_Set_SystemCreationClassName(&powerManagementServiceRef, get_system_creation_class_name());
+ Cura_HostedService_Set_Dependent(&w, &powerManagementServiceRef);
KReturnInstance(cr, w);
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_HostedServiceGetInstance(
+static CMPIStatus Cura_HostedServiceGetInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -73,7 +73,7 @@ static CMPIStatus Linux_HostedServiceGetInstance(
_cb, mi, cc, cr, cop, properties);
}
-static CMPIStatus Linux_HostedServiceCreateInstance(
+static CMPIStatus Cura_HostedServiceCreateInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -83,7 +83,7 @@ static CMPIStatus Linux_HostedServiceCreateInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_HostedServiceModifyInstance(
+static CMPIStatus Cura_HostedServiceModifyInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -94,7 +94,7 @@ static CMPIStatus Linux_HostedServiceModifyInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_HostedServiceDeleteInstance(
+static CMPIStatus Cura_HostedServiceDeleteInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -103,7 +103,7 @@ static CMPIStatus Linux_HostedServiceDeleteInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_HostedServiceExecQuery(
+static CMPIStatus Cura_HostedServiceExecQuery(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -114,7 +114,7 @@ static CMPIStatus Linux_HostedServiceExecQuery(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_HostedServiceAssociationCleanup(
+static CMPIStatus Cura_HostedServiceAssociationCleanup(
CMPIAssociationMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -122,7 +122,7 @@ static CMPIStatus Linux_HostedServiceAssociationCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_HostedServiceAssociators(
+static CMPIStatus Cura_HostedServiceAssociators(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -139,7 +139,7 @@ static CMPIStatus Linux_HostedServiceAssociators(
cc,
cr,
cop,
- Linux_HostedService_ClassName,
+ Cura_HostedService_ClassName,
assocClass,
resultClass,
role,
@@ -147,7 +147,7 @@ static CMPIStatus Linux_HostedServiceAssociators(
properties);
}
-static CMPIStatus Linux_HostedServiceAssociatorNames(
+static CMPIStatus Cura_HostedServiceAssociatorNames(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -163,14 +163,14 @@ static CMPIStatus Linux_HostedServiceAssociatorNames(
cc,
cr,
cop,
- Linux_HostedService_ClassName,
+ Cura_HostedService_ClassName,
assocClass,
resultClass,
role,
resultRole);
}
-static CMPIStatus Linux_HostedServiceReferences(
+static CMPIStatus Cura_HostedServiceReferences(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -185,13 +185,13 @@ static CMPIStatus Linux_HostedServiceReferences(
cc,
cr,
cop,
- Linux_HostedService_ClassName,
+ Cura_HostedService_ClassName,
assocClass,
role,
properties);
}
-static CMPIStatus Linux_HostedServiceReferenceNames(
+static CMPIStatus Cura_HostedServiceReferenceNames(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -205,25 +205,25 @@ static CMPIStatus Linux_HostedServiceReferenceNames(
cc,
cr,
cop,
- Linux_HostedService_ClassName,
+ Cura_HostedService_ClassName,
assocClass,
role);
}
CMInstanceMIStub(
- Linux_HostedService,
- Linux_HostedService,
+ Cura_HostedService,
+ Cura_HostedService,
_cb,
- Linux_HostedServiceInitialize())
+ Cura_HostedServiceInitialize())
CMAssociationMIStub(
- Linux_HostedService,
- Linux_HostedService,
+ Cura_HostedService,
+ Cura_HostedService,
_cb,
- Linux_HostedServiceInitialize())
+ Cura_HostedServiceInitialize())
KONKRET_REGISTRATION(
"root/cimv2",
- "Linux_HostedService",
- "Linux_HostedService",
+ "Cura_HostedService",
+ "Cura_HostedService",
"instance association")
diff --git a/src/power/Linux_PowerManagementCapabilitiesProvider.c b/src/power/Cura_PowerManagementCapabilitiesProvider.c
index bb74e34..5e7f4fc 100644
--- a/src/power/Linux_PowerManagementCapabilitiesProvider.c
+++ b/src/power/Cura_PowerManagementCapabilitiesProvider.c
@@ -1,21 +1,21 @@
#include <konkret/konkret.h>
-#include "Linux_PowerManagementCapabilities.h"
+#include "Cura_PowerManagementCapabilities.h"
#include "power.h"
static const CMPIBroker* _cb = NULL;
-static void Linux_PowerManagementCapabilitiesInitialize(CMPIInstanceMI *mi)
+static void Cura_PowerManagementCapabilitiesInitialize(CMPIInstanceMI *mi)
{
mi->hdl = power_ref(_cb);
}
-static void Linux_PowerManagementCapabilitiesInitializeMethod(CMPIMethodMI *mi)
+static void Cura_PowerManagementCapabilitiesInitializeMethod(CMPIMethodMI *mi)
{
mi->hdl = power_ref(_cb);
}
-static CMPIStatus Linux_PowerManagementCapabilitiesCleanup(
+static CMPIStatus Cura_PowerManagementCapabilitiesCleanup(
CMPIInstanceMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -25,7 +25,7 @@ static CMPIStatus Linux_PowerManagementCapabilitiesCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_PowerManagementCapabilitiesEnumInstanceNames(
+static CMPIStatus Cura_PowerManagementCapabilitiesEnumInstanceNames(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -35,7 +35,7 @@ static CMPIStatus Linux_PowerManagementCapabilitiesEnumInstanceNames(
_cb, mi, cc, cr, cop);
}
-static CMPIStatus Linux_PowerManagementCapabilitiesEnumInstances(
+static CMPIStatus Cura_PowerManagementCapabilitiesEnumInstances(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -44,30 +44,30 @@ static CMPIStatus Linux_PowerManagementCapabilitiesEnumInstances(
{
const char *ns = KNameSpace(cop);
- Linux_PowerManagementCapabilities w;
- Linux_PowerManagementCapabilities_Init(&w, _cb, ns);
+ Cura_PowerManagementCapabilities w;
+ Cura_PowerManagementCapabilities_Init(&w, _cb, ns);
// TODO: make it unique
- Linux_PowerManagementCapabilities_Set_InstanceID(&w, "Linux:PowerManagementCapabilities");
- Linux_PowerManagementCapabilities_Set_ElementName(&w, "Linux:PowerManagementCapabilities");
- Linux_PowerManagementCapabilities_Set_Caption(&w, "Linux:PowerManagementCapabilities");
+ Cura_PowerManagementCapabilities_Set_InstanceID(&w, "Linux:PowerManagementCapabilities");
+ Cura_PowerManagementCapabilities_Set_ElementName(&w, "Linux:PowerManagementCapabilities");
+ Cura_PowerManagementCapabilities_Set_Caption(&w, "Linux:PowerManagementCapabilities");
int count;
unsigned short *list = power_available_requested_power_states(mi->hdl, &count);
- Linux_PowerManagementCapabilities_Init_PowerStatesSupported(&w, count);
+ Cura_PowerManagementCapabilities_Init_PowerStatesSupported(&w, count);
for (int i = 0; i < count; i++) {
- Linux_PowerManagementCapabilities_Set_PowerStatesSupported(&w, i, list[i]);
+ Cura_PowerManagementCapabilities_Set_PowerStatesSupported(&w, i, list[i]);
}
// TODO: get this list dynamically from PowerStatesSupported (see SMASH)
- Linux_PowerManagementCapabilities_Init_PowerChangeCapabilities(&w, 3);
- Linux_PowerManagementCapabilities_Set_PowerChangeCapabilities(&w, 0, Linux_PowerManagementCapabilities_PowerChangeCapabilities_Power_State_Settable);
- Linux_PowerManagementCapabilities_Set_PowerChangeCapabilities(&w, 1, Linux_PowerManagementCapabilities_PowerChangeCapabilities_Power_Cycling_Supported);
- Linux_PowerManagementCapabilities_Set_PowerChangeCapabilities(&w, 2, Linux_PowerManagementCapabilities_PowerChangeCapabilities_Graceful_Shutdown_Supported);
+ Cura_PowerManagementCapabilities_Init_PowerChangeCapabilities(&w, 3);
+ Cura_PowerManagementCapabilities_Set_PowerChangeCapabilities(&w, 0, Cura_PowerManagementCapabilities_PowerChangeCapabilities_Power_State_Settable);
+ Cura_PowerManagementCapabilities_Set_PowerChangeCapabilities(&w, 1, Cura_PowerManagementCapabilities_PowerChangeCapabilities_Power_Cycling_Supported);
+ Cura_PowerManagementCapabilities_Set_PowerChangeCapabilities(&w, 2, Cura_PowerManagementCapabilities_PowerChangeCapabilities_Graceful_Shutdown_Supported);
KReturnInstance(cr, w);
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_PowerManagementCapabilitiesGetInstance(
+static CMPIStatus Cura_PowerManagementCapabilitiesGetInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -78,7 +78,7 @@ static CMPIStatus Linux_PowerManagementCapabilitiesGetInstance(
_cb, mi, cc, cr, cop, properties);
}
-static CMPIStatus Linux_PowerManagementCapabilitiesCreateInstance(
+static CMPIStatus Cura_PowerManagementCapabilitiesCreateInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -88,7 +88,7 @@ static CMPIStatus Linux_PowerManagementCapabilitiesCreateInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_PowerManagementCapabilitiesModifyInstance(
+static CMPIStatus Cura_PowerManagementCapabilitiesModifyInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -99,7 +99,7 @@ static CMPIStatus Linux_PowerManagementCapabilitiesModifyInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_PowerManagementCapabilitiesDeleteInstance(
+static CMPIStatus Cura_PowerManagementCapabilitiesDeleteInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -108,7 +108,7 @@ static CMPIStatus Linux_PowerManagementCapabilitiesDeleteInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_PowerManagementCapabilitiesExecQuery(
+static CMPIStatus Cura_PowerManagementCapabilitiesExecQuery(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -120,12 +120,12 @@ static CMPIStatus Linux_PowerManagementCapabilitiesExecQuery(
}
CMInstanceMIStub(
- Linux_PowerManagementCapabilities,
- Linux_PowerManagementCapabilities,
+ Cura_PowerManagementCapabilities,
+ Cura_PowerManagementCapabilities,
_cb,
- Linux_PowerManagementCapabilitiesInitialize(&mi))
+ Cura_PowerManagementCapabilitiesInitialize(&mi))
-static CMPIStatus Linux_PowerManagementCapabilitiesMethodCleanup(
+static CMPIStatus Cura_PowerManagementCapabilitiesMethodCleanup(
CMPIMethodMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -136,7 +136,7 @@ static CMPIStatus Linux_PowerManagementCapabilitiesMethodCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_PowerManagementCapabilitiesInvokeMethod(
+static CMPIStatus Cura_PowerManagementCapabilitiesInvokeMethod(
CMPIMethodMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -145,18 +145,18 @@ static CMPIStatus Linux_PowerManagementCapabilitiesInvokeMethod(
const CMPIArgs* in,
CMPIArgs* out)
{
- return Linux_PowerManagementCapabilities_DispatchMethod(
+ return Cura_PowerManagementCapabilities_DispatchMethod(
_cb, mi, cc, cr, cop, meth, in, out);
}
CMMethodMIStub(
- Linux_PowerManagementCapabilities,
- Linux_PowerManagementCapabilities,
+ Cura_PowerManagementCapabilities,
+ Cura_PowerManagementCapabilities,
_cb,
- Linux_PowerManagementCapabilitiesInitializeMethod(&mi))
+ Cura_PowerManagementCapabilitiesInitializeMethod(&mi))
KONKRET_REGISTRATION(
"root/cimv2",
- "Linux_PowerManagementCapabilities",
- "Linux_PowerManagementCapabilities",
+ "Cura_PowerManagementCapabilities",
+ "Cura_PowerManagementCapabilities",
"instance method")
diff --git a/src/power/Linux_PowerManagementServiceProvider.c b/src/power/Cura_PowerManagementServiceProvider.c
index 053c602..dcdb2bc 100644
--- a/src/power/Linux_PowerManagementServiceProvider.c
+++ b/src/power/Cura_PowerManagementServiceProvider.c
@@ -1,23 +1,23 @@
-#include "Linux_PowerManagementService.h"
+#include "Cura_PowerManagementService.h"
#include "power.h"
#include "globals.h"
static const CMPIBroker* _cb = NULL;
-static void Linux_PowerManagementServiceInitialize(CMPIInstanceMI *mi)
+static void Cura_PowerManagementServiceInitialize(CMPIInstanceMI *mi)
{
mi->hdl = power_ref(_cb);
}
-static void Linux_PowerManagementServiceMethodInitialize(CMPIMethodMI *mi)
+static void Cura_PowerManagementServiceMethodInitialize(CMPIMethodMI *mi)
{
mi->hdl = power_ref(_cb);
}
-static CMPIStatus Linux_PowerManagementServiceCleanup(
+static CMPIStatus Cura_PowerManagementServiceCleanup(
CMPIInstanceMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -27,7 +27,7 @@ static CMPIStatus Linux_PowerManagementServiceCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_PowerManagementServiceEnumInstanceNames(
+static CMPIStatus Cura_PowerManagementServiceEnumInstanceNames(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -37,26 +37,26 @@ static CMPIStatus Linux_PowerManagementServiceEnumInstanceNames(
_cb, mi, cc, cr, cop);
}
-static CMPIStatus Linux_PowerManagementServiceEnumInstances(
+static CMPIStatus Cura_PowerManagementServiceEnumInstances(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
const CMPIObjectPath* cop,
const char** properties)
{
- Linux_PowerManagementService w;
+ Cura_PowerManagementService w;
- Linux_PowerManagementService_Init(&w, _cb, KNameSpace(cop));
- Linux_PowerManagementService_Set_CreationClassName(&w, "Linux_PowerManagementService");
- Linux_PowerManagementService_Set_Name(&w, get_system_name());
- Linux_PowerManagementService_Set_SystemCreationClassName(&w, get_system_creation_class_name());
- Linux_PowerManagementService_Set_SystemName(&w, get_system_name());
+ Cura_PowerManagementService_Init(&w, _cb, KNameSpace(cop));
+ Cura_PowerManagementService_Set_CreationClassName(&w, "Cura_PowerManagementService");
+ Cura_PowerManagementService_Set_Name(&w, get_system_name());
+ Cura_PowerManagementService_Set_SystemCreationClassName(&w, get_system_creation_class_name());
+ Cura_PowerManagementService_Set_SystemName(&w, get_system_name());
/* EnabledState is an integer enumeration that indicates the enabled
* and disabled states of an element. It can also indicate the transitions
* between these requested states.
*/
- Linux_PowerManagementService_Set_EnabledState(&w, Linux_PowerManagementService_EnabledDefault_Enabled);
+ Cura_PowerManagementService_Set_EnabledState(&w, Cura_PowerManagementService_EnabledDefault_Enabled);
/* RequestedState is an integer enumeration that indicates the last
@@ -65,20 +65,20 @@ static CMPIStatus Linux_PowerManagementServiceEnumInstances(
* represented by EnabledState. This property is provided to compare the
* last requested and current enabled or disabled states.
*/
- Linux_PowerManagementService_Set_RequestedState(&w, Linux_PowerManagementService_RequestedState_No_Change);
+ Cura_PowerManagementService_Set_RequestedState(&w, Cura_PowerManagementService_RequestedState_No_Change);
- Linux_PowerManagementService_Init_AvailableRequestedStates(&w, 2);
- Linux_PowerManagementService_Set_AvailableRequestedStates(&w, 0, 2); // Enabled
- Linux_PowerManagementService_Set_AvailableRequestedStates(&w, 1, 3); // Disabled
+ Cura_PowerManagementService_Init_AvailableRequestedStates(&w, 2);
+ Cura_PowerManagementService_Set_AvailableRequestedStates(&w, 0, 2); // Enabled
+ Cura_PowerManagementService_Set_AvailableRequestedStates(&w, 1, 3); // Disabled
- Linux_PowerManagementService_Print(&w, stderr);
+ Cura_PowerManagementService_Print(&w, stderr);
KReturnInstance(cr, w);
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_PowerManagementServiceGetInstance(
+static CMPIStatus Cura_PowerManagementServiceGetInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -89,7 +89,7 @@ static CMPIStatus Linux_PowerManagementServiceGetInstance(
_cb, mi, cc, cr, cop, properties);
}
-static CMPIStatus Linux_PowerManagementServiceCreateInstance(
+static CMPIStatus Cura_PowerManagementServiceCreateInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -99,7 +99,7 @@ static CMPIStatus Linux_PowerManagementServiceCreateInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_PowerManagementServiceModifyInstance(
+static CMPIStatus Cura_PowerManagementServiceModifyInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -110,7 +110,7 @@ static CMPIStatus Linux_PowerManagementServiceModifyInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_PowerManagementServiceDeleteInstance(
+static CMPIStatus Cura_PowerManagementServiceDeleteInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -119,7 +119,7 @@ static CMPIStatus Linux_PowerManagementServiceDeleteInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Linux_PowerManagementServiceExecQuery(
+static CMPIStatus Cura_PowerManagementServiceExecQuery(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -131,12 +131,12 @@ static CMPIStatus Linux_PowerManagementServiceExecQuery(
}
CMInstanceMIStub(
- Linux_PowerManagementService,
- Linux_PowerManagementService,
+ Cura_PowerManagementService,
+ Cura_PowerManagementService,
_cb,
- Linux_PowerManagementServiceInitialize(&mi))
+ Cura_PowerManagementServiceInitialize(&mi))
-static CMPIStatus Linux_PowerManagementServiceMethodCleanup(
+static CMPIStatus Cura_PowerManagementServiceMethodCleanup(
CMPIMethodMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -146,7 +146,7 @@ static CMPIStatus Linux_PowerManagementServiceMethodCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Linux_PowerManagementServiceInvokeMethod(
+static CMPIStatus Cura_PowerManagementServiceInvokeMethod(
CMPIMethodMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -155,21 +155,21 @@ static CMPIStatus Linux_PowerManagementServiceInvokeMethod(
const CMPIArgs* in,
CMPIArgs* out)
{
- return Linux_PowerManagementService_DispatchMethod(
+ return Cura_PowerManagementService_DispatchMethod(
_cb, mi, cc, cr, cop, meth, in, out);
}
CMMethodMIStub(
- Linux_PowerManagementService,
- Linux_PowerManagementService,
+ Cura_PowerManagementService,
+ Cura_PowerManagementService,
_cb,
- Linux_PowerManagementServiceMethodInitialize(&mi))
+ Cura_PowerManagementServiceMethodInitialize(&mi))
-KUint32 Linux_PowerManagementService_RequestStateChange(
+KUint32 Cura_PowerManagementService_RequestStateChange(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Linux_PowerManagementServiceRef* self,
+ const Cura_PowerManagementServiceRef* self,
const KUint16* RequestedState,
KRef* Job,
const KDateTime* TimeoutPeriod,
@@ -182,11 +182,11 @@ KUint32 Linux_PowerManagementService_RequestStateChange(
}
-KUint32 Linux_PowerManagementService_StartService(
+KUint32 Cura_PowerManagementService_StartService(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Linux_PowerManagementServiceRef* self,
+ const Cura_PowerManagementServiceRef* self,
CMPIStatus* status)
{
KUint32 result = KUINT32_INIT;
@@ -195,11 +195,11 @@ KUint32 Linux_PowerManagementService_StartService(
return result;
}
-KUint32 Linux_PowerManagementService_StopService(
+KUint32 Cura_PowerManagementService_StopService(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Linux_PowerManagementServiceRef* self,
+ const Cura_PowerManagementServiceRef* self,
CMPIStatus* status)
{
KUint32 result = KUINT32_INIT;
@@ -208,11 +208,11 @@ KUint32 Linux_PowerManagementService_StopService(
return result;
}
-KUint32 Linux_PowerManagementService_SetPowerState(
+KUint32 Cura_PowerManagementService_SetPowerState(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Linux_PowerManagementServiceRef* self,
+ const Cura_PowerManagementServiceRef* self,
const KUint16* PowerState,
const KRef* ManagedElement,
const KDateTime* Time,
@@ -224,11 +224,11 @@ KUint32 Linux_PowerManagementService_SetPowerState(
return result;
}
-KUint32 Linux_PowerManagementService_RequestPowerStateChange(
+KUint32 Cura_PowerManagementService_RequestPowerStateChange(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Linux_PowerManagementServiceRef* self,
+ const Cura_PowerManagementServiceRef* self,
const KUint16* PowerState,
const KRef* ManagedElement,
const KDateTime* Time,
@@ -263,6 +263,6 @@ KUint32 Linux_PowerManagementService_RequestPowerStateChange(
KONKRET_REGISTRATION(
"root/cimv2",
- "Linux_PowerManagementService",
- "Linux_PowerManagementService",
+ "Cura_PowerManagementService",
+ "Cura_PowerManagementService",
"instance method")
diff --git a/src/power/power.c b/src/power/power.c
index 3210a37..4042f4a 100644
--- a/src/power/power.c
+++ b/src/power/power.c
@@ -5,8 +5,8 @@
#include <glib.h>
-#include "Linux_AssociatedPowerManagementService.h"
-#include "Linux_ConcreteJob.h"
+#include "Cura_AssociatedPowerManagementService.h"
+#include "Cura_ConcreteJob.h"
#ifdef HAS_UPOWER
#include <upower.h>
@@ -70,8 +70,8 @@ Power *power_new(const CMPIBroker *_cb)
Power *power = malloc(sizeof(Power));
power->broker = _cb;
power->instances = 0;
- power->requestedPowerState = Linux_AssociatedPowerManagementService_RequestedPowerState_Unknown;
- power->transitioningToPowerState = Linux_AssociatedPowerManagementService_TransitioningToPowerState_No_Change;
+ power->requestedPowerState = Cura_AssociatedPowerManagementService_RequestedPowerState_Unknown;
+ power->transitioningToPowerState = Cura_AssociatedPowerManagementService_TransitioningToPowerState_No_Change;
power->mutex = _cb->xft->newMutex(0);
power->jobs = NULL;
#ifdef HAS_UPOWER
@@ -125,7 +125,7 @@ void *state_change_thread(void *data)
{
PowerStateChangeJob *powerStateChangeJob = data;
MUTEX_LOCK(powerStateChangeJob);
- powerStateChangeJob->jobState = Linux_ConcreteJob_JobState_Running;
+ powerStateChangeJob->jobState = Cura_ConcreteJob_JobState_Running;
powerStateChangeJob->timeOfLastChange = time(NULL);
MUTEX_UNLOCK(powerStateChangeJob);
@@ -133,14 +133,14 @@ void *state_change_thread(void *data)
// Check if the job was cancelled
if (powerStateChangeJob->cancelled) {
MUTEX_LOCK(powerStateChangeJob);
- powerStateChangeJob->jobState = Linux_ConcreteJob_JobState_Terminated;
+ powerStateChangeJob->jobState = Cura_ConcreteJob_JobState_Terminated;
powerStateChangeJob->timeOfLastChange = time(NULL);
MUTEX_UNLOCK(powerStateChangeJob);
if (!powerStateChangeJob->superseded) {
// There is no job that replaced this job
MUTEX_LOCK(powerStateChangeJob->power);
- powerStateChangeJob->power->transitioningToPowerState = Linux_AssociatedPowerManagementService_TransitioningToPowerState_No_Change;
+ powerStateChangeJob->power->transitioningToPowerState = Cura_AssociatedPowerManagementService_TransitioningToPowerState_No_Change;
MUTEX_UNLOCK(powerStateChangeJob->power);
}
@@ -155,7 +155,7 @@ void *state_change_thread(void *data)
int succeeded = 0;
switch (powerStateChangeJob->requestedPowerState) {
- case Linux_AssociatedPowerManagementService_PowerState_Sleep__Deep:
+ case Cura_AssociatedPowerManagementService_PowerState_Sleep__Deep:
// Sleep
#ifdef HAS_UPOWER
succeeded = up_client_suspend_sync(powerStateChangeJob->power->up, NULL, &error);
@@ -163,7 +163,7 @@ void *state_change_thread(void *data)
succeeded = system("pm-suspend") == 0;
#endif
break;
- case Linux_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft:
+ case Cura_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft:
// Reboot (without shutting down programs)
#ifdef HAS_SYSTEMCTL
succeeded = system("systemctl --force reboot &") == 0;
@@ -171,7 +171,7 @@ void *state_change_thread(void *data)
succeeded = system("reboot --force &") == 0;
#endif
break;
- case Linux_AssociatedPowerManagementService_PowerState_Hibernate_Off___Soft:
+ case Cura_AssociatedPowerManagementService_PowerState_Hibernate_Off___Soft:
// Hibernate
#ifdef HAS_UPOWER
succeeded = up_client_hibernate_sync(powerStateChangeJob->power->up, NULL, &error);
@@ -179,7 +179,7 @@ void *state_change_thread(void *data)
succeeded = system("pm-hibernate") == 0;
#endif
break;
- case Linux_AssociatedPowerManagementService_PowerState_Off___Soft:
+ case Cura_AssociatedPowerManagementService_PowerState_Off___Soft:
// Poweroff (without shutting down programs)
#ifdef HAS_SYSTEMCTL
succeeded = system("systemctl --force poweroff &") == 0;
@@ -187,7 +187,7 @@ void *state_change_thread(void *data)
succeeded = system("shutdown --halt now &") == 0;
#endif
break;
- case Linux_AssociatedPowerManagementService_PowerState_Off___Soft_Graceful:
+ case Cura_AssociatedPowerManagementService_PowerState_Off___Soft_Graceful:
// Poweroff (shut down programs first)
#ifdef HAS_SYSTEMCTL
succeeded = system("systemctl poweroff &") == 0;
@@ -195,7 +195,7 @@ void *state_change_thread(void *data)
succeeded = system("shutdown --poweroff now &") == 0;
#endif
break;
- case Linux_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft_Graceful:
+ case Cura_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft_Graceful:
// Reboot (shut down programs first)
#ifdef HAS_SYSTEMCTL
succeeded = system("systemctl reboot &") == 0;
@@ -206,14 +206,14 @@ void *state_change_thread(void *data)
}
MUTEX_LOCK(powerStateChangeJob->power);
- powerStateChangeJob->power->transitioningToPowerState = Linux_AssociatedPowerManagementService_TransitioningToPowerState_No_Change;
+ powerStateChangeJob->power->transitioningToPowerState = Cura_AssociatedPowerManagementService_TransitioningToPowerState_No_Change;
MUTEX_UNLOCK(powerStateChangeJob->power);
MUTEX_LOCK(powerStateChangeJob);
if (succeeded) {
- powerStateChangeJob->jobState = Linux_ConcreteJob_JobState_Completed;
+ powerStateChangeJob->jobState = Cura_ConcreteJob_JobState_Completed;
} else {
- powerStateChangeJob->jobState = Linux_ConcreteJob_JobState_Exception;
+ powerStateChangeJob->jobState = Cura_ConcreteJob_JobState_Exception;
#ifdef HAS_UPOWER
if (error != NULL) {
powerStateChangeJob->error = error->message;
@@ -250,7 +250,7 @@ int power_request_power_state(Power *power, unsigned short state)
powerStateChangeJob->power = power;
powerStateChangeJob->mutex = power->broker->xft->newMutex(0);
powerStateChangeJob->requestedPowerState = state;
- powerStateChangeJob->jobState = Linux_ConcreteJob_JobState_New;
+ powerStateChangeJob->jobState = Cura_ConcreteJob_JobState_New;
powerStateChangeJob->cancelled = 0;
powerStateChangeJob->superseded = 0;
powerStateChangeJob->timeOfLastChange = time(NULL);
@@ -266,13 +266,13 @@ int power_request_power_state(Power *power, unsigned short state)
while (plist) {
job = plist->data;
MUTEX_LOCK(job);
- if (job->jobState != Linux_ConcreteJob_JobState_Suspended &&
- job->jobState != Linux_ConcreteJob_JobState_Killed &&
- job->jobState != Linux_ConcreteJob_JobState_Terminated) {
+ if (job->jobState != Cura_ConcreteJob_JobState_Suspended &&
+ job->jobState != Cura_ConcreteJob_JobState_Killed &&
+ job->jobState != Cura_ConcreteJob_JobState_Terminated) {
job->cancelled = 1;
job->superseded = 1;
- job->jobState = Linux_ConcreteJob_JobState_Shutting_Down;
+ job->jobState = Cura_ConcreteJob_JobState_Shutting_Down;
job->timeOfLastChange = time(NULL);
}
MUTEX_UNLOCK(job);
@@ -292,7 +292,7 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
int i = 0;
/* 1 Other
- * Linux_AssociatedPowerManagementService_PowerState_Other
+ * Cura_AssociatedPowerManagementService_PowerState_Other
*/
/* 2 On
@@ -300,7 +300,7 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
*
* Bring system to full On from any state (Sleep, Hibernate, Off)
*
- * Linux_AssociatedPowerManagementService_PowerState_On
+ * Cura_AssociatedPowerManagementService_PowerState_On
*/
// not supported
@@ -309,7 +309,7 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
*
* Standby
*
- * Linux_AssociatedPowerManagementService_PowerState_Sleep___Light
+ * Cura_AssociatedPowerManagementService_PowerState_Sleep___Light
*/
// not supported
@@ -318,16 +318,16 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
*
* Suspend
*
- * Linux_AssociatedPowerManagementService_PowerState_Sleep__Deep
+ * Cura_AssociatedPowerManagementService_PowerState_Sleep__Deep
*/
// Sleep
#ifdef HAS_UPOWER
if (up_client_get_can_suspend(power->up)) {
- list[i++] = Linux_AssociatedPowerManagementService_PowerState_Sleep__Deep;
+ list[i++] = Cura_AssociatedPowerManagementService_PowerState_Sleep__Deep;
}
#else
if (system("pm-is-supported --suspend") == 0) {
- list[i++] = Linux_AssociatedPowerManagementService_PowerState_Sleep__Deep;
+ list[i++] = Cura_AssociatedPowerManagementService_PowerState_Sleep__Deep;
}
#endif
@@ -337,10 +337,10 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
*
* Reset system without removing power
*
- * Linux_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft
+ * Cura_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft
*/
// Reboot (without shutting down programs)
- list[i++] = Linux_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft;
+ list[i++] = Cura_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft;
/* 6 Off - Hard
* corresponding to ACPI state G3, S5, or D3.
@@ -348,7 +348,7 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
* Power Off performed through mechanical means like unplugging
* power cable or UPS On
*
- * Linux_AssociatedPowerManagementService_PowerState_Off___Hard
+ * Cura_AssociatedPowerManagementService_PowerState_Off___Hard
*/
/* 7 Hibernate (Off - Soft)
@@ -358,16 +358,16 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
* System context and OS image written to non-volatile storage;
* system and devices powered off
*
- * Linux_AssociatedPowerManagementService_PowerState_Hibernate_Off___Soft
+ * Cura_AssociatedPowerManagementService_PowerState_Hibernate_Off___Soft
*/
// Hibernate
#ifdef HAS_UPOWER
if (up_client_get_can_hibernate(power->up)) {
- list[i++] = Linux_AssociatedPowerManagementService_PowerState_Hibernate_Off___Soft;
+ list[i++] = Cura_AssociatedPowerManagementService_PowerState_Hibernate_Off___Soft;
}
#else
if (system("pm-is-supported --hibernate") == 0) {
- list[i++] = Linux_AssociatedPowerManagementService_PowerState_Hibernate_Off___Soft;
+ list[i++] = Cura_AssociatedPowerManagementService_PowerState_Hibernate_Off___Soft;
}
#endif
@@ -376,10 +376,10 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
*
* System power off but auxiliary or flea power may be available
*
- * Linux_AssociatedPowerManagementService_PowerState_Off___Soft
+ * Cura_AssociatedPowerManagementService_PowerState_Off___Soft
*/
// Poweroff (without shutting down programs)
- list[i++] = Linux_AssociatedPowerManagementService_PowerState_Off___Soft;
+ list[i++] = Cura_AssociatedPowerManagementService_PowerState_Off___Soft;
/* 9 Power Cycle (Off-Hard)
* corresponds to the managed element reaching the ACPI state G3
@@ -387,7 +387,7 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
*
* Equivalent to Off–Hard followed by On
*
- * Linux_AssociatedPowerManagementService_PowerState_Power_Cycle_Off_Hard
+ * Cura_AssociatedPowerManagementService_PowerState_Power_Cycle_Off_Hard
*/
// not implemented
@@ -397,7 +397,7 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
*
* Hardware reset
*
- * Linux_AssociatedPowerManagementService_PowerState_Master_Bus_Reset
+ * Cura_AssociatedPowerManagementService_PowerState_Master_Bus_Reset
*/
// not implemented
@@ -407,7 +407,7 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
*
* Hardware reset
*
- * Linux_AssociatedPowerManagementService_PowerState_Diagnostic_Interrupt_NMI
+ * Cura_AssociatedPowerManagementService_PowerState_Diagnostic_Interrupt_NMI
*/
// not implemented
@@ -418,10 +418,10 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
* System power off but auxiliary or flea power may be available but preceded
* by a request to the managed element to perform an orderly shutdown.
*
- * Linux_AssociatedPowerManagementService_PowerState_Off___Soft_Graceful
+ * Cura_AssociatedPowerManagementService_PowerState_Off___Soft_Graceful
*/
// Poweroff (shut down programs first)
- list[i++] = Linux_AssociatedPowerManagementService_PowerState_Off___Soft_Graceful;
+ list[i++] = Cura_AssociatedPowerManagementService_PowerState_Off___Soft_Graceful;
/* 13 Off - Hard Graceful
* equivalent to Off Hard but preceded by a request to the managed element
@@ -431,7 +431,7 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
* or UPS On but preceded by a request to the managed element to perform
* an orderly shutdown.
*
- * Linux_AssociatedPowerManagementService_PowerState_Off___Hard_Graceful
+ * Cura_AssociatedPowerManagementService_PowerState_Off___Hard_Graceful
*/
// not implemented
@@ -442,7 +442,7 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
* Hardware reset but preceded by a request to the managed element
* to perform an orderly shutdown.
*
- * Linux_AssociatedPowerManagementService_PowerState_Master_Bus_Reset_Graceful
+ * Cura_AssociatedPowerManagementService_PowerState_Master_Bus_Reset_Graceful
*/
// not implemented
@@ -453,10 +453,10 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
* Reset system without removing power but preceded by a request
* to the managed element to perform an orderly shutdown.
*
- * Linux_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft_Graceful
+ * Cura_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft_Graceful
*/
// Reboot (shut down programs first)
- list[i++] = Linux_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft_Graceful;
+ list[i++] = Cura_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft_Graceful;
/* 16 Power Cycle (Off - Hard Graceful)
* equivalent to Power Cycle (Off - Hard) but preceded by a request
@@ -465,7 +465,7 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
* Equivalent to Off–Hard followed by On but preceded by a request
* to the managed element to perform an orderly shutdown.
*
- * Linux_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Hard_Graceful
+ * Cura_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Hard_Graceful
*/
// not implemented
@@ -485,9 +485,9 @@ GList *power_get_jobs(Power *power)
while (plist) {
powerStateChangeJob = plist->data;
MUTEX_LOCK(powerStateChangeJob);
- if ((powerStateChangeJob->jobState == Linux_ConcreteJob_JobState_Completed ||
- powerStateChangeJob->jobState == Linux_ConcreteJob_JobState_Killed ||
- powerStateChangeJob->jobState == Linux_ConcreteJob_JobState_Terminated) &&
+ if ((powerStateChangeJob->jobState == Cura_ConcreteJob_JobState_Completed ||
+ powerStateChangeJob->jobState == Cura_ConcreteJob_JobState_Killed ||
+ powerStateChangeJob->jobState == Cura_ConcreteJob_JobState_Terminated) &&
time(NULL) - powerStateChangeJob->timeOfLastChange > powerStateChangeJob->timeBeforeRemoval) {
MUTEX_LOCK(power);