summaryrefslogtreecommitdiffstats
path: root/src/power
diff options
context:
space:
mode:
Diffstat (limited to 'src/power')
-rw-r--r--src/power/CMakeLists.txt2
-rw-r--r--src/power/LMI_AssociatedPowerManagementServiceProvider.c (renamed from src/power/Cura_AssociatedPowerManagementServiceProvider.c)96
-rw-r--r--src/power/LMI_ConcreteJobProvider.c (renamed from src/power/Cura_ConcreteJobProvider.c)68
-rw-r--r--src/power/LMI_ElementCapabilitiesProvider.c (renamed from src/power/Cura_ElementCapabilitiesProvider.c)80
-rw-r--r--src/power/LMI_HostedServiceProvider.c (renamed from src/power/Cura_HostedServiceProvider.c)74
-rw-r--r--src/power/LMI_PowerManagementCapabilitiesProvider.c (renamed from src/power/Cura_PowerManagementCapabilitiesProvider.c)66
-rw-r--r--src/power/LMI_PowerManagementServiceProvider.c (renamed from src/power/Cura_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 592380d..a577af9 100644
--- a/src/power/CMakeLists.txt
+++ b/src/power/CMakeLists.txt
@@ -1,7 +1,7 @@
set(PROVIDER_NAME PowerManagement)
set(LIBRARY_NAME cmpiCura_${PROVIDER_NAME})
-set(MOF Cura_PowerManagement.mof)
+set(MOF LMI_PowerManagement.mof)
set(provider_SRCS
power.c
diff --git a/src/power/Cura_AssociatedPowerManagementServiceProvider.c b/src/power/LMI_AssociatedPowerManagementServiceProvider.c
index 81f8883..777f736 100644
--- a/src/power/Cura_AssociatedPowerManagementServiceProvider.c
+++ b/src/power/LMI_AssociatedPowerManagementServiceProvider.c
@@ -15,8 +15,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "Cura_AssociatedPowerManagementService.h"
-#include "Cura_PowerManagementService.h"
+#include "LMI_AssociatedPowerManagementService.h"
+#include "LMI_PowerManagementService.h"
#include "CIM_ComputerSystem.h"
#include "power.h"
@@ -25,17 +25,17 @@
static const CMPIBroker* _cb;
-static void Cura_AssociatedPowerManagementServiceInitialize(CMPIInstanceMI *mi)
+static void LMI_AssociatedPowerManagementServiceInitialize(CMPIInstanceMI *mi)
{
mi->hdl = power_ref(_cb);
}
-static void Cura_AssociatedPowerManagementServiceAssociationInitialize(CMPIAssociationMI *mi)
+static void LMI_AssociatedPowerManagementServiceAssociationInitialize(CMPIAssociationMI *mi)
{
mi->hdl = power_ref(_cb);
}
-static CMPIStatus Cura_AssociatedPowerManagementServiceCleanup(
+static CMPIStatus LMI_AssociatedPowerManagementServiceCleanup(
CMPIInstanceMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -45,7 +45,7 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_AssociatedPowerManagementServiceEnumInstanceNames(
+static CMPIStatus LMI_AssociatedPowerManagementServiceEnumInstanceNames(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -55,7 +55,7 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceEnumInstanceNames(
_cb, mi, cc, cr, cop);
}
-static CMPIStatus Cura_AssociatedPowerManagementServiceEnumInstances(
+static CMPIStatus LMI_AssociatedPowerManagementServiceEnumInstances(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -65,8 +65,8 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceEnumInstances(
CMPIStatus rc;
const char *ns = KNameSpace(cop);
- Cura_AssociatedPowerManagementService w;
- Cura_AssociatedPowerManagementService_Init(&w, _cb, ns);
+ LMI_AssociatedPowerManagementService w;
+ LMI_AssociatedPowerManagementService_Init(&w, _cb, ns);
CIM_ComputerSystemRef computerSystemRef;
CIM_ComputerSystemRef_Init(&computerSystemRef, _cb, ns);
@@ -74,32 +74,32 @@ static CMPIStatus Cura_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());
- Cura_AssociatedPowerManagementService_SetObjectPath_UserOfService(&w, computerSystemOP);
+ LMI_AssociatedPowerManagementService_SetObjectPath_UserOfService(&w, computerSystemOP);
- 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);
+ LMI_PowerManagementServiceRef powerManagementServiceRef;
+ LMI_PowerManagementServiceRef_Init(&powerManagementServiceRef, _cb, ns);
+ LMI_PowerManagementServiceRef_Set_Name(&powerManagementServiceRef, get_system_name());
+ LMI_PowerManagementServiceRef_Set_SystemName(&powerManagementServiceRef, get_system_name());
+ LMI_PowerManagementServiceRef_Set_CreationClassName(&powerManagementServiceRef, "LMI_PowerManagementService");
+ LMI_PowerManagementServiceRef_Set_SystemCreationClassName(&powerManagementServiceRef, get_system_creation_class_name());
+ LMI_AssociatedPowerManagementService_Set_ServiceProvided(&w, &powerManagementServiceRef);
int count;
unsigned short *list = power_available_requested_power_states(mi->hdl, &count);
- Cura_AssociatedPowerManagementService_Init_AvailableRequestedPowerStates(&w, count);
+ LMI_AssociatedPowerManagementService_Init_AvailableRequestedPowerStates(&w, count);
for (int i = 0; i < count; i++) {
- Cura_AssociatedPowerManagementService_Set_AvailableRequestedPowerStates(&w, i, list[i]);
+ LMI_AssociatedPowerManagementService_Set_AvailableRequestedPowerStates(&w, i, list[i]);
}
- 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));
+ LMI_AssociatedPowerManagementService_Set_TransitioningToPowerState(&w, power_transitioning_to_power_state(mi->hdl));
+ LMI_AssociatedPowerManagementService_Set_PowerState(&w, 2);
+ LMI_AssociatedPowerManagementService_Set_RequestedPowerState(&w, power_requested_power_state(mi->hdl));
KReturnInstance(cr, w);
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_AssociatedPowerManagementServiceGetInstance(
+static CMPIStatus LMI_AssociatedPowerManagementServiceGetInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -110,7 +110,7 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceGetInstance(
_cb, mi, cc, cr, cop, properties);
}
-static CMPIStatus Cura_AssociatedPowerManagementServiceCreateInstance(
+static CMPIStatus LMI_AssociatedPowerManagementServiceCreateInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -120,7 +120,7 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceCreateInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_AssociatedPowerManagementServiceModifyInstance(
+static CMPIStatus LMI_AssociatedPowerManagementServiceModifyInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -131,7 +131,7 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceModifyInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_AssociatedPowerManagementServiceDeleteInstance(
+static CMPIStatus LMI_AssociatedPowerManagementServiceDeleteInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -140,7 +140,7 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceDeleteInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_AssociatedPowerManagementServiceExecQuery(
+static CMPIStatus LMI_AssociatedPowerManagementServiceExecQuery(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -151,7 +151,7 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceExecQuery(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_AssociatedPowerManagementServiceAssociationCleanup(
+static CMPIStatus LMI_AssociatedPowerManagementServiceAssociationCleanup(
CMPIAssociationMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -162,7 +162,7 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceAssociationCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_AssociatedPowerManagementServiceAssociators(
+static CMPIStatus LMI_AssociatedPowerManagementServiceAssociators(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -174,7 +174,7 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceAssociators(
const char** properties)
{
if (!assocClass) {
- assocClass = "Cura_AssociatedPowerManagementService";
+ assocClass = "LMI_AssociatedPowerManagementService";
}
return KDefaultAssociators(
@@ -183,7 +183,7 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceAssociators(
cc,
cr,
cop,
- Cura_AssociatedPowerManagementService_ClassName,
+ LMI_AssociatedPowerManagementService_ClassName,
assocClass,
resultClass,
role,
@@ -191,7 +191,7 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceAssociators(
properties);
}
-static CMPIStatus Cura_AssociatedPowerManagementServiceAssociatorNames(
+static CMPIStatus LMI_AssociatedPowerManagementServiceAssociatorNames(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -202,7 +202,7 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceAssociatorNames(
const char* resultRole)
{
if (!assocClass) {
- assocClass = "Cura_AssociatedPowerManagementService";
+ assocClass = "LMI_AssociatedPowerManagementService";
}
return KDefaultAssociatorNames(
@@ -211,14 +211,14 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceAssociatorNames(
cc,
cr,
cop,
- Cura_AssociatedPowerManagementService_ClassName,
+ LMI_AssociatedPowerManagementService_ClassName,
assocClass,
resultClass,
role,
resultRole);
}
-static CMPIStatus Cura_AssociatedPowerManagementServiceReferences(
+static CMPIStatus LMI_AssociatedPowerManagementServiceReferences(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -228,7 +228,7 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceReferences(
const char** properties)
{
if (!assocClass) {
- assocClass = "Cura_AssociatedPowerManagementService";
+ assocClass = "LMI_AssociatedPowerManagementService";
}
return KDefaultReferences(
@@ -237,13 +237,13 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceReferences(
cc,
cr,
cop,
- Cura_AssociatedPowerManagementService_ClassName,
+ LMI_AssociatedPowerManagementService_ClassName,
assocClass,
role,
properties);
}
-static CMPIStatus Cura_AssociatedPowerManagementServiceReferenceNames(
+static CMPIStatus LMI_AssociatedPowerManagementServiceReferenceNames(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -252,7 +252,7 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceReferenceNames(
const char* role)
{
if (!assocClass) {
- assocClass = "Cura_AssociatedPowerManagementService";
+ assocClass = "LMI_AssociatedPowerManagementService";
}
return KDefaultReferenceNames(
@@ -261,25 +261,25 @@ static CMPIStatus Cura_AssociatedPowerManagementServiceReferenceNames(
cc,
cr,
cop,
- Cura_AssociatedPowerManagementService_ClassName,
+ LMI_AssociatedPowerManagementService_ClassName,
assocClass,
role);
}
CMInstanceMIStub(
- Cura_AssociatedPowerManagementService,
- Cura_AssociatedPowerManagementService,
+ LMI_AssociatedPowerManagementService,
+ LMI_AssociatedPowerManagementService,
_cb,
- Cura_AssociatedPowerManagementServiceInitialize(&mi))
+ LMI_AssociatedPowerManagementServiceInitialize(&mi))
CMAssociationMIStub(
- Cura_AssociatedPowerManagementService,
- Cura_AssociatedPowerManagementService,
+ LMI_AssociatedPowerManagementService,
+ LMI_AssociatedPowerManagementService,
_cb,
- Cura_AssociatedPowerManagementServiceAssociationInitialize(&mi))
+ LMI_AssociatedPowerManagementServiceAssociationInitialize(&mi))
KONKRET_REGISTRATION(
"root/cimv2",
- "Cura_AssociatedPowerManagementService",
- "Cura_AssociatedPowerManagementService",
+ "LMI_AssociatedPowerManagementService",
+ "LMI_AssociatedPowerManagementService",
"instance association")
diff --git a/src/power/Cura_ConcreteJobProvider.c b/src/power/LMI_ConcreteJobProvider.c
index 54775dc..7677ef4 100644
--- a/src/power/Cura_ConcreteJobProvider.c
+++ b/src/power/LMI_ConcreteJobProvider.c
@@ -17,24 +17,24 @@
#include <konkret/konkret.h>
#include <stdint.h>
-#include "Cura_ConcreteJob.h"
+#include "LMI_ConcreteJob.h"
#include "globals.h"
static const CMPIBroker* _cb = NULL;
#include "power.h"
-static void Cura_ConcreteJobInitializeInstance(CMPIInstanceMI *mi)
+static void LMI_ConcreteJobInitializeInstance(CMPIInstanceMI *mi)
{
mi->hdl = power_ref(_cb);
}
-static void Cura_ConcreteJobInitializeMethod(CMPIMethodMI *mi)
+static void LMI_ConcreteJobInitializeMethod(CMPIMethodMI *mi)
{
mi->hdl = power_ref(_cb);
}
-static CMPIStatus Cura_ConcreteJobCleanup(
+static CMPIStatus LMI_ConcreteJobCleanup(
CMPIInstanceMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -47,7 +47,7 @@ static CMPIStatus Cura_ConcreteJobCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_ConcreteJobEnumInstanceNames(
+static CMPIStatus LMI_ConcreteJobEnumInstanceNames(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -57,7 +57,7 @@ static CMPIStatus Cura_ConcreteJobEnumInstanceNames(
_cb, mi, cc, cr, cop);
}
-static CMPIStatus Cura_ConcreteJobEnumInstances(
+static CMPIStatus LMI_ConcreteJobEnumInstances(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -72,12 +72,12 @@ static CMPIStatus Cura_ConcreteJobEnumInstances(
while (plist) {
powerStateChangeJob = plist->data;
- 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_
+ LMI_ConcreteJob concreteJob;
+ LMI_ConcreteJob_Init(&concreteJob, _cb, ns);
+ LMI_ConcreteJob_Set_InstanceID(&concreteJob, "LMI_PowerStateChange_ConcreteJob:123"); // TODO: unique ID
+ LMI_ConcreteJob_Set_JobState(&concreteJob, job_state(powerStateChangeJob));
+ LMI_ConcreteJob_Set_TimeOfLastStateChange(&concreteJob, CMNewDateTimeFromBinary(_cb, ((uint64_t) job_timeOfLastChange(powerStateChangeJob)) * 1000000, 0, &status));
+ //LMI_ConcreteJob_Set_
KReturnInstance(cr, concreteJob);
plist = g_list_next(plist);
}
@@ -85,7 +85,7 @@ static CMPIStatus Cura_ConcreteJobEnumInstances(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_ConcreteJobGetInstance(
+static CMPIStatus LMI_ConcreteJobGetInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -96,7 +96,7 @@ static CMPIStatus Cura_ConcreteJobGetInstance(
_cb, mi, cc, cr, cop, properties);
}
-static CMPIStatus Cura_ConcreteJobCreateInstance(
+static CMPIStatus LMI_ConcreteJobCreateInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -107,7 +107,7 @@ static CMPIStatus Cura_ConcreteJobCreateInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_ConcreteJobModifyInstance(
+static CMPIStatus LMI_ConcreteJobModifyInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -118,7 +118,7 @@ static CMPIStatus Cura_ConcreteJobModifyInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_ConcreteJobDeleteInstance(
+static CMPIStatus LMI_ConcreteJobDeleteInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -127,7 +127,7 @@ static CMPIStatus Cura_ConcreteJobDeleteInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_ConcreteJobExecQuery(
+static CMPIStatus LMI_ConcreteJobExecQuery(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -139,12 +139,12 @@ static CMPIStatus Cura_ConcreteJobExecQuery(
}
CMInstanceMIStub(
- Cura_ConcreteJob,
- Cura_ConcreteJob,
+ LMI_ConcreteJob,
+ LMI_ConcreteJob,
_cb,
- Cura_ConcreteJobInitializeInstance(&mi))
+ LMI_ConcreteJobInitializeInstance(&mi))
-static CMPIStatus Cura_ConcreteJobMethodCleanup(
+static CMPIStatus LMI_ConcreteJobMethodCleanup(
CMPIMethodMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -153,7 +153,7 @@ static CMPIStatus Cura_ConcreteJobMethodCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_ConcreteJobInvokeMethod(
+static CMPIStatus LMI_ConcreteJobInvokeMethod(
CMPIMethodMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -162,21 +162,21 @@ static CMPIStatus Cura_ConcreteJobInvokeMethod(
const CMPIArgs* in,
CMPIArgs* out)
{
- return Cura_ConcreteJob_DispatchMethod(
+ return LMI_ConcreteJob_DispatchMethod(
_cb, mi, cc, cr, cop, meth, in, out);
}
CMMethodMIStub(
- Cura_ConcreteJob,
- Cura_ConcreteJob,
+ LMI_ConcreteJob,
+ LMI_ConcreteJob,
_cb,
- Cura_ConcreteJobInitializeMethod(&mi))
+ LMI_ConcreteJobInitializeMethod(&mi))
-KUint32 Cura_ConcreteJob_KillJob(
+KUint32 LMI_ConcreteJob_KillJob(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_ConcreteJobRef* self,
+ const LMI_ConcreteJobRef* self,
const KBoolean* DeleteOnKill,
CMPIStatus* status)
{
@@ -186,11 +186,11 @@ KUint32 Cura_ConcreteJob_KillJob(
return result;
}
-KUint32 Cura_ConcreteJob_RequestStateChange(
+KUint32 LMI_ConcreteJob_RequestStateChange(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_ConcreteJobRef* self,
+ const LMI_ConcreteJobRef* self,
const KUint16* RequestedState,
const KDateTime* TimeoutPeriod,
CMPIStatus* status)
@@ -201,11 +201,11 @@ KUint32 Cura_ConcreteJob_RequestStateChange(
return result;
}
-KUint32 Cura_ConcreteJob_GetError(
+KUint32 LMI_ConcreteJob_GetError(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_ConcreteJobRef* self,
+ const LMI_ConcreteJobRef* self,
KString* Error,
CMPIStatus* status)
{
@@ -217,6 +217,6 @@ KUint32 Cura_ConcreteJob_GetError(
KONKRET_REGISTRATION(
"root/cimv2",
- "Cura_ConcreteJob",
- "Cura_ConcreteJob",
+ "LMI_ConcreteJob",
+ "LMI_ConcreteJob",
"instance method")
diff --git a/src/power/Cura_ElementCapabilitiesProvider.c b/src/power/LMI_ElementCapabilitiesProvider.c
index 6d08021..46ebe8c 100644
--- a/src/power/Cura_ElementCapabilitiesProvider.c
+++ b/src/power/LMI_ElementCapabilitiesProvider.c
@@ -16,16 +16,16 @@
*/
#include <konkret/konkret.h>
-#include "Cura_ElementCapabilities.h"
+#include "LMI_ElementCapabilities.h"
#include "globals.h"
static const CMPIBroker* _cb;
-static void Cura_ElementCapabilitiesInitialize()
+static void LMI_ElementCapabilitiesInitialize()
{
}
-static CMPIStatus Cura_ElementCapabilitiesCleanup(
+static CMPIStatus LMI_ElementCapabilitiesCleanup(
CMPIInstanceMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -33,7 +33,7 @@ static CMPIStatus Cura_ElementCapabilitiesCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_ElementCapabilitiesEnumInstanceNames(
+static CMPIStatus LMI_ElementCapabilitiesEnumInstanceNames(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -43,7 +43,7 @@ static CMPIStatus Cura_ElementCapabilitiesEnumInstanceNames(
_cb, mi, cc, cr, cop);
}
-static CMPIStatus Cura_ElementCapabilitiesEnumInstances(
+static CMPIStatus LMI_ElementCapabilitiesEnumInstances(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -52,29 +52,29 @@ static CMPIStatus Cura_ElementCapabilitiesEnumInstances(
{
const char *ns = KNameSpace(cop);
- Cura_ElementCapabilities w;
- Cura_ElementCapabilities_Init(&w, _cb, ns);
+ LMI_ElementCapabilities w;
+ LMI_ElementCapabilities_Init(&w, _cb, ns);
- 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());
+ LMI_PowerManagementServiceRef powerManagementServiceRef;
+ LMI_PowerManagementServiceRef_Init(&powerManagementServiceRef, _cb, ns);
+ LMI_PowerManagementServiceRef_Set_Name(&powerManagementServiceRef, get_system_name());
+ LMI_PowerManagementServiceRef_Set_SystemName(&powerManagementServiceRef, get_system_name());
+ LMI_PowerManagementServiceRef_Set_CreationClassName(&powerManagementServiceRef, "LMI_PowerManagementService");
+ LMI_PowerManagementServiceRef_Set_SystemCreationClassName(&powerManagementServiceRef, get_system_creation_class_name());
- Cura_ElementCapabilities_Set_ManagedElement(&w, &powerManagementServiceRef);
+ LMI_ElementCapabilities_Set_ManagedElement(&w, &powerManagementServiceRef);
- Cura_PowerManagementCapabilitiesRef powerManagementCapabilitiesRef;
- Cura_PowerManagementCapabilitiesRef_Init(&powerManagementCapabilitiesRef, _cb, ns);
- Cura_PowerManagementCapabilitiesRef_Set_InstanceID(&powerManagementCapabilitiesRef, "RedHat:PowerManagementCapabilities");
+ LMI_PowerManagementCapabilitiesRef powerManagementCapabilitiesRef;
+ LMI_PowerManagementCapabilitiesRef_Init(&powerManagementCapabilitiesRef, _cb, ns);
+ LMI_PowerManagementCapabilitiesRef_Set_InstanceID(&powerManagementCapabilitiesRef, "RedHat:PowerManagementCapabilities");
- Cura_ElementCapabilities_Set_Capabilities(&w, &powerManagementCapabilitiesRef);
+ LMI_ElementCapabilities_Set_Capabilities(&w, &powerManagementCapabilitiesRef);
KReturnInstance(cr, w);
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_ElementCapabilitiesGetInstance(
+static CMPIStatus LMI_ElementCapabilitiesGetInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -85,7 +85,7 @@ static CMPIStatus Cura_ElementCapabilitiesGetInstance(
_cb, mi, cc, cr, cop, properties);
}
-static CMPIStatus Cura_ElementCapabilitiesCreateInstance(
+static CMPIStatus LMI_ElementCapabilitiesCreateInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -95,7 +95,7 @@ static CMPIStatus Cura_ElementCapabilitiesCreateInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_ElementCapabilitiesModifyInstance(
+static CMPIStatus LMI_ElementCapabilitiesModifyInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -106,7 +106,7 @@ static CMPIStatus Cura_ElementCapabilitiesModifyInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_ElementCapabilitiesDeleteInstance(
+static CMPIStatus LMI_ElementCapabilitiesDeleteInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -115,7 +115,7 @@ static CMPIStatus Cura_ElementCapabilitiesDeleteInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_ElementCapabilitiesExecQuery(
+static CMPIStatus LMI_ElementCapabilitiesExecQuery(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -126,7 +126,7 @@ static CMPIStatus Cura_ElementCapabilitiesExecQuery(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_ElementCapabilitiesAssociationCleanup(
+static CMPIStatus LMI_ElementCapabilitiesAssociationCleanup(
CMPIAssociationMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -134,7 +134,7 @@ static CMPIStatus Cura_ElementCapabilitiesAssociationCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_ElementCapabilitiesAssociators(
+static CMPIStatus LMI_ElementCapabilitiesAssociators(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -151,7 +151,7 @@ static CMPIStatus Cura_ElementCapabilitiesAssociators(
cc,
cr,
cop,
- Cura_ElementCapabilities_ClassName,
+ LMI_ElementCapabilities_ClassName,
assocClass,
resultClass,
role,
@@ -159,7 +159,7 @@ static CMPIStatus Cura_ElementCapabilitiesAssociators(
properties);
}
-static CMPIStatus Cura_ElementCapabilitiesAssociatorNames(
+static CMPIStatus LMI_ElementCapabilitiesAssociatorNames(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -175,14 +175,14 @@ static CMPIStatus Cura_ElementCapabilitiesAssociatorNames(
cc,
cr,
cop,
- Cura_ElementCapabilities_ClassName,
+ LMI_ElementCapabilities_ClassName,
assocClass,
resultClass,
role,
resultRole);
}
-static CMPIStatus Cura_ElementCapabilitiesReferences(
+static CMPIStatus LMI_ElementCapabilitiesReferences(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -197,13 +197,13 @@ static CMPIStatus Cura_ElementCapabilitiesReferences(
cc,
cr,
cop,
- Cura_ElementCapabilities_ClassName,
+ LMI_ElementCapabilities_ClassName,
assocClass,
role,
properties);
}
-static CMPIStatus Cura_ElementCapabilitiesReferenceNames(
+static CMPIStatus LMI_ElementCapabilitiesReferenceNames(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -217,25 +217,25 @@ static CMPIStatus Cura_ElementCapabilitiesReferenceNames(
cc,
cr,
cop,
- Cura_ElementCapabilities_ClassName,
+ LMI_ElementCapabilities_ClassName,
assocClass,
role);
}
CMInstanceMIStub(
- Cura_ElementCapabilities,
- Cura_ElementCapabilities,
+ LMI_ElementCapabilities,
+ LMI_ElementCapabilities,
_cb,
- Cura_ElementCapabilitiesInitialize())
+ LMI_ElementCapabilitiesInitialize())
CMAssociationMIStub(
- Cura_ElementCapabilities,
- Cura_ElementCapabilities,
+ LMI_ElementCapabilities,
+ LMI_ElementCapabilities,
_cb,
- Cura_ElementCapabilitiesInitialize())
+ LMI_ElementCapabilitiesInitialize())
KONKRET_REGISTRATION(
"root/cimv2",
- "Cura_ElementCapabilities",
- "Cura_ElementCapabilities",
+ "LMI_ElementCapabilities",
+ "LMI_ElementCapabilities",
"instance association")
diff --git a/src/power/Cura_HostedServiceProvider.c b/src/power/LMI_HostedServiceProvider.c
index e396446..e6bf6f1 100644
--- a/src/power/Cura_HostedServiceProvider.c
+++ b/src/power/LMI_HostedServiceProvider.c
@@ -17,17 +17,17 @@
#include <cmpimacs.h>
#include <konkret/konkret.h>
-#include "Cura_HostedService.h"
+#include "LMI_HostedService.h"
#include "globals.h"
static const CMPIBroker* _cb;
-static void Cura_HostedServiceInitialize()
+static void LMI_HostedServiceInitialize()
{
}
-static CMPIStatus Cura_HostedServiceCleanup(
+static CMPIStatus LMI_HostedServiceCleanup(
CMPIInstanceMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -35,7 +35,7 @@ static CMPIStatus Cura_HostedServiceCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_HostedServiceEnumInstanceNames(
+static CMPIStatus LMI_HostedServiceEnumInstanceNames(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -45,7 +45,7 @@ static CMPIStatus Cura_HostedServiceEnumInstanceNames(
_cb, mi, cc, cr, cop);
}
-static CMPIStatus Cura_HostedServiceEnumInstances(
+static CMPIStatus LMI_HostedServiceEnumInstances(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -55,8 +55,8 @@ static CMPIStatus Cura_HostedServiceEnumInstances(
CMPIStatus rc;
const char *ns = KNameSpace(cop);
- Cura_HostedService w;
- Cura_HostedService_Init(&w, _cb, ns);
+ LMI_HostedService w;
+ LMI_HostedService_Init(&w, _cb, ns);
CIM_ComputerSystemRef computerSystemRef;
CIM_ComputerSystemRef_Init(&computerSystemRef, _cb, ns);
@@ -64,21 +64,21 @@ static CMPIStatus Cura_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());
- Cura_HostedService_SetObjectPath_Antecedent(&w, computerSystemOP);
+ LMI_HostedService_SetObjectPath_Antecedent(&w, computerSystemOP);
- 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);
+ LMI_PowerManagementServiceRef powerManagementServiceRef;
+ LMI_PowerManagementServiceRef_Init(&powerManagementServiceRef, _cb, ns);
+ LMI_PowerManagementServiceRef_Set_Name(&powerManagementServiceRef, get_system_name());
+ LMI_PowerManagementServiceRef_Set_SystemName(&powerManagementServiceRef, get_system_name());
+ LMI_PowerManagementServiceRef_Set_CreationClassName(&powerManagementServiceRef, "LMI_PowerManagementService");
+ LMI_PowerManagementServiceRef_Set_SystemCreationClassName(&powerManagementServiceRef, get_system_creation_class_name());
+ LMI_HostedService_Set_Dependent(&w, &powerManagementServiceRef);
KReturnInstance(cr, w);
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_HostedServiceGetInstance(
+static CMPIStatus LMI_HostedServiceGetInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -89,7 +89,7 @@ static CMPIStatus Cura_HostedServiceGetInstance(
_cb, mi, cc, cr, cop, properties);
}
-static CMPIStatus Cura_HostedServiceCreateInstance(
+static CMPIStatus LMI_HostedServiceCreateInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -99,7 +99,7 @@ static CMPIStatus Cura_HostedServiceCreateInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_HostedServiceModifyInstance(
+static CMPIStatus LMI_HostedServiceModifyInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -110,7 +110,7 @@ static CMPIStatus Cura_HostedServiceModifyInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_HostedServiceDeleteInstance(
+static CMPIStatus LMI_HostedServiceDeleteInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -119,7 +119,7 @@ static CMPIStatus Cura_HostedServiceDeleteInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_HostedServiceExecQuery(
+static CMPIStatus LMI_HostedServiceExecQuery(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -130,7 +130,7 @@ static CMPIStatus Cura_HostedServiceExecQuery(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_HostedServiceAssociationCleanup(
+static CMPIStatus LMI_HostedServiceAssociationCleanup(
CMPIAssociationMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -138,7 +138,7 @@ static CMPIStatus Cura_HostedServiceAssociationCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_HostedServiceAssociators(
+static CMPIStatus LMI_HostedServiceAssociators(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -155,7 +155,7 @@ static CMPIStatus Cura_HostedServiceAssociators(
cc,
cr,
cop,
- Cura_HostedService_ClassName,
+ LMI_HostedService_ClassName,
assocClass,
resultClass,
role,
@@ -163,7 +163,7 @@ static CMPIStatus Cura_HostedServiceAssociators(
properties);
}
-static CMPIStatus Cura_HostedServiceAssociatorNames(
+static CMPIStatus LMI_HostedServiceAssociatorNames(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -179,14 +179,14 @@ static CMPIStatus Cura_HostedServiceAssociatorNames(
cc,
cr,
cop,
- Cura_HostedService_ClassName,
+ LMI_HostedService_ClassName,
assocClass,
resultClass,
role,
resultRole);
}
-static CMPIStatus Cura_HostedServiceReferences(
+static CMPIStatus LMI_HostedServiceReferences(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -201,13 +201,13 @@ static CMPIStatus Cura_HostedServiceReferences(
cc,
cr,
cop,
- Cura_HostedService_ClassName,
+ LMI_HostedService_ClassName,
assocClass,
role,
properties);
}
-static CMPIStatus Cura_HostedServiceReferenceNames(
+static CMPIStatus LMI_HostedServiceReferenceNames(
CMPIAssociationMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -221,25 +221,25 @@ static CMPIStatus Cura_HostedServiceReferenceNames(
cc,
cr,
cop,
- Cura_HostedService_ClassName,
+ LMI_HostedService_ClassName,
assocClass,
role);
}
CMInstanceMIStub(
- Cura_HostedService,
- Cura_HostedService,
+ LMI_HostedService,
+ LMI_HostedService,
_cb,
- Cura_HostedServiceInitialize())
+ LMI_HostedServiceInitialize())
CMAssociationMIStub(
- Cura_HostedService,
- Cura_HostedService,
+ LMI_HostedService,
+ LMI_HostedService,
_cb,
- Cura_HostedServiceInitialize())
+ LMI_HostedServiceInitialize())
KONKRET_REGISTRATION(
"root/cimv2",
- "Cura_HostedService",
- "Cura_HostedService",
+ "LMI_HostedService",
+ "LMI_HostedService",
"instance association")
diff --git a/src/power/Cura_PowerManagementCapabilitiesProvider.c b/src/power/LMI_PowerManagementCapabilitiesProvider.c
index 587733c..d97c144 100644
--- a/src/power/Cura_PowerManagementCapabilitiesProvider.c
+++ b/src/power/LMI_PowerManagementCapabilitiesProvider.c
@@ -16,23 +16,23 @@
*/
#include <konkret/konkret.h>
-#include "Cura_PowerManagementCapabilities.h"
+#include "LMI_PowerManagementCapabilities.h"
#include "power.h"
static const CMPIBroker* _cb = NULL;
-static void Cura_PowerManagementCapabilitiesInitialize(CMPIInstanceMI *mi)
+static void LMI_PowerManagementCapabilitiesInitialize(CMPIInstanceMI *mi)
{
mi->hdl = power_ref(_cb);
}
-static void Cura_PowerManagementCapabilitiesInitializeMethod(CMPIMethodMI *mi)
+static void LMI_PowerManagementCapabilitiesInitializeMethod(CMPIMethodMI *mi)
{
mi->hdl = power_ref(_cb);
}
-static CMPIStatus Cura_PowerManagementCapabilitiesCleanup(
+static CMPIStatus LMI_PowerManagementCapabilitiesCleanup(
CMPIInstanceMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -42,7 +42,7 @@ static CMPIStatus Cura_PowerManagementCapabilitiesCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_PowerManagementCapabilitiesEnumInstanceNames(
+static CMPIStatus LMI_PowerManagementCapabilitiesEnumInstanceNames(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -52,7 +52,7 @@ static CMPIStatus Cura_PowerManagementCapabilitiesEnumInstanceNames(
_cb, mi, cc, cr, cop);
}
-static CMPIStatus Cura_PowerManagementCapabilitiesEnumInstances(
+static CMPIStatus LMI_PowerManagementCapabilitiesEnumInstances(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -61,30 +61,30 @@ static CMPIStatus Cura_PowerManagementCapabilitiesEnumInstances(
{
const char *ns = KNameSpace(cop);
- Cura_PowerManagementCapabilities w;
- Cura_PowerManagementCapabilities_Init(&w, _cb, ns);
+ LMI_PowerManagementCapabilities w;
+ LMI_PowerManagementCapabilities_Init(&w, _cb, ns);
// TODO: make it unique
- Cura_PowerManagementCapabilities_Set_InstanceID(&w, "Linux:PowerManagementCapabilities");
- Cura_PowerManagementCapabilities_Set_ElementName(&w, "Linux:PowerManagementCapabilities");
- Cura_PowerManagementCapabilities_Set_Caption(&w, "Linux:PowerManagementCapabilities");
+ LMI_PowerManagementCapabilities_Set_InstanceID(&w, "Linux:PowerManagementCapabilities");
+ LMI_PowerManagementCapabilities_Set_ElementName(&w, "Linux:PowerManagementCapabilities");
+ LMI_PowerManagementCapabilities_Set_Caption(&w, "Linux:PowerManagementCapabilities");
int count;
unsigned short *list = power_available_requested_power_states(mi->hdl, &count);
- Cura_PowerManagementCapabilities_Init_PowerStatesSupported(&w, count);
+ LMI_PowerManagementCapabilities_Init_PowerStatesSupported(&w, count);
for (int i = 0; i < count; i++) {
- Cura_PowerManagementCapabilities_Set_PowerStatesSupported(&w, i, list[i]);
+ LMI_PowerManagementCapabilities_Set_PowerStatesSupported(&w, i, list[i]);
}
// TODO: get this list dynamically from PowerStatesSupported (see SMASH)
- 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);
+ LMI_PowerManagementCapabilities_Init_PowerChangeCapabilities(&w, 3);
+ LMI_PowerManagementCapabilities_Set_PowerChangeCapabilities(&w, 0, LMI_PowerManagementCapabilities_PowerChangeCapabilities_Power_State_Settable);
+ LMI_PowerManagementCapabilities_Set_PowerChangeCapabilities(&w, 1, LMI_PowerManagementCapabilities_PowerChangeCapabilities_Power_Cycling_Supported);
+ LMI_PowerManagementCapabilities_Set_PowerChangeCapabilities(&w, 2, LMI_PowerManagementCapabilities_PowerChangeCapabilities_Graceful_Shutdown_Supported);
KReturnInstance(cr, w);
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_PowerManagementCapabilitiesGetInstance(
+static CMPIStatus LMI_PowerManagementCapabilitiesGetInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -95,7 +95,7 @@ static CMPIStatus Cura_PowerManagementCapabilitiesGetInstance(
_cb, mi, cc, cr, cop, properties);
}
-static CMPIStatus Cura_PowerManagementCapabilitiesCreateInstance(
+static CMPIStatus LMI_PowerManagementCapabilitiesCreateInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -105,7 +105,7 @@ static CMPIStatus Cura_PowerManagementCapabilitiesCreateInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_PowerManagementCapabilitiesModifyInstance(
+static CMPIStatus LMI_PowerManagementCapabilitiesModifyInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -116,7 +116,7 @@ static CMPIStatus Cura_PowerManagementCapabilitiesModifyInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_PowerManagementCapabilitiesDeleteInstance(
+static CMPIStatus LMI_PowerManagementCapabilitiesDeleteInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -125,7 +125,7 @@ static CMPIStatus Cura_PowerManagementCapabilitiesDeleteInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_PowerManagementCapabilitiesExecQuery(
+static CMPIStatus LMI_PowerManagementCapabilitiesExecQuery(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -137,12 +137,12 @@ static CMPIStatus Cura_PowerManagementCapabilitiesExecQuery(
}
CMInstanceMIStub(
- Cura_PowerManagementCapabilities,
- Cura_PowerManagementCapabilities,
+ LMI_PowerManagementCapabilities,
+ LMI_PowerManagementCapabilities,
_cb,
- Cura_PowerManagementCapabilitiesInitialize(&mi))
+ LMI_PowerManagementCapabilitiesInitialize(&mi))
-static CMPIStatus Cura_PowerManagementCapabilitiesMethodCleanup(
+static CMPIStatus LMI_PowerManagementCapabilitiesMethodCleanup(
CMPIMethodMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -153,7 +153,7 @@ static CMPIStatus Cura_PowerManagementCapabilitiesMethodCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_PowerManagementCapabilitiesInvokeMethod(
+static CMPIStatus LMI_PowerManagementCapabilitiesInvokeMethod(
CMPIMethodMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -162,18 +162,18 @@ static CMPIStatus Cura_PowerManagementCapabilitiesInvokeMethod(
const CMPIArgs* in,
CMPIArgs* out)
{
- return Cura_PowerManagementCapabilities_DispatchMethod(
+ return LMI_PowerManagementCapabilities_DispatchMethod(
_cb, mi, cc, cr, cop, meth, in, out);
}
CMMethodMIStub(
- Cura_PowerManagementCapabilities,
- Cura_PowerManagementCapabilities,
+ LMI_PowerManagementCapabilities,
+ LMI_PowerManagementCapabilities,
_cb,
- Cura_PowerManagementCapabilitiesInitializeMethod(&mi))
+ LMI_PowerManagementCapabilitiesInitializeMethod(&mi))
KONKRET_REGISTRATION(
"root/cimv2",
- "Cura_PowerManagementCapabilities",
- "Cura_PowerManagementCapabilities",
+ "LMI_PowerManagementCapabilities",
+ "LMI_PowerManagementCapabilities",
"instance method")
diff --git a/src/power/Cura_PowerManagementServiceProvider.c b/src/power/LMI_PowerManagementServiceProvider.c
index 493cc63..d3857cb 100644
--- a/src/power/Cura_PowerManagementServiceProvider.c
+++ b/src/power/LMI_PowerManagementServiceProvider.c
@@ -15,25 +15,25 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "Cura_PowerManagementService.h"
+#include "LMI_PowerManagementService.h"
#include "power.h"
#include "globals.h"
static const CMPIBroker* _cb = NULL;
-static void Cura_PowerManagementServiceInitialize(CMPIInstanceMI *mi)
+static void LMI_PowerManagementServiceInitialize(CMPIInstanceMI *mi)
{
mi->hdl = power_ref(_cb);
}
-static void Cura_PowerManagementServiceMethodInitialize(CMPIMethodMI *mi)
+static void LMI_PowerManagementServiceMethodInitialize(CMPIMethodMI *mi)
{
mi->hdl = power_ref(_cb);
}
-static CMPIStatus Cura_PowerManagementServiceCleanup(
+static CMPIStatus LMI_PowerManagementServiceCleanup(
CMPIInstanceMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -43,7 +43,7 @@ static CMPIStatus Cura_PowerManagementServiceCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_PowerManagementServiceEnumInstanceNames(
+static CMPIStatus LMI_PowerManagementServiceEnumInstanceNames(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -53,26 +53,26 @@ static CMPIStatus Cura_PowerManagementServiceEnumInstanceNames(
_cb, mi, cc, cr, cop);
}
-static CMPIStatus Cura_PowerManagementServiceEnumInstances(
+static CMPIStatus LMI_PowerManagementServiceEnumInstances(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
const CMPIObjectPath* cop,
const char** properties)
{
- Cura_PowerManagementService w;
+ LMI_PowerManagementService w;
- 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());
+ LMI_PowerManagementService_Init(&w, _cb, KNameSpace(cop));
+ LMI_PowerManagementService_Set_CreationClassName(&w, "LMI_PowerManagementService");
+ LMI_PowerManagementService_Set_Name(&w, get_system_name());
+ LMI_PowerManagementService_Set_SystemCreationClassName(&w, get_system_creation_class_name());
+ LMI_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.
*/
- Cura_PowerManagementService_Set_EnabledState(&w, Cura_PowerManagementService_EnabledDefault_Enabled);
+ LMI_PowerManagementService_Set_EnabledState(&w, LMI_PowerManagementService_EnabledDefault_Enabled);
/* RequestedState is an integer enumeration that indicates the last
@@ -81,20 +81,20 @@ static CMPIStatus Cura_PowerManagementServiceEnumInstances(
* represented by EnabledState. This property is provided to compare the
* last requested and current enabled or disabled states.
*/
- Cura_PowerManagementService_Set_RequestedState(&w, Cura_PowerManagementService_RequestedState_No_Change);
+ LMI_PowerManagementService_Set_RequestedState(&w, LMI_PowerManagementService_RequestedState_No_Change);
- Cura_PowerManagementService_Init_AvailableRequestedStates(&w, 2);
- Cura_PowerManagementService_Set_AvailableRequestedStates(&w, 0, 2); // Enabled
- Cura_PowerManagementService_Set_AvailableRequestedStates(&w, 1, 3); // Disabled
+ LMI_PowerManagementService_Init_AvailableRequestedStates(&w, 2);
+ LMI_PowerManagementService_Set_AvailableRequestedStates(&w, 0, 2); // Enabled
+ LMI_PowerManagementService_Set_AvailableRequestedStates(&w, 1, 3); // Disabled
- Cura_PowerManagementService_Print(&w, stderr);
+ LMI_PowerManagementService_Print(&w, stderr);
KReturnInstance(cr, w);
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_PowerManagementServiceGetInstance(
+static CMPIStatus LMI_PowerManagementServiceGetInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -105,7 +105,7 @@ static CMPIStatus Cura_PowerManagementServiceGetInstance(
_cb, mi, cc, cr, cop, properties);
}
-static CMPIStatus Cura_PowerManagementServiceCreateInstance(
+static CMPIStatus LMI_PowerManagementServiceCreateInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -115,7 +115,7 @@ static CMPIStatus Cura_PowerManagementServiceCreateInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_PowerManagementServiceModifyInstance(
+static CMPIStatus LMI_PowerManagementServiceModifyInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -126,7 +126,7 @@ static CMPIStatus Cura_PowerManagementServiceModifyInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_PowerManagementServiceDeleteInstance(
+static CMPIStatus LMI_PowerManagementServiceDeleteInstance(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -135,7 +135,7 @@ static CMPIStatus Cura_PowerManagementServiceDeleteInstance(
CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
}
-static CMPIStatus Cura_PowerManagementServiceExecQuery(
+static CMPIStatus LMI_PowerManagementServiceExecQuery(
CMPIInstanceMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -147,12 +147,12 @@ static CMPIStatus Cura_PowerManagementServiceExecQuery(
}
CMInstanceMIStub(
- Cura_PowerManagementService,
- Cura_PowerManagementService,
+ LMI_PowerManagementService,
+ LMI_PowerManagementService,
_cb,
- Cura_PowerManagementServiceInitialize(&mi))
+ LMI_PowerManagementServiceInitialize(&mi))
-static CMPIStatus Cura_PowerManagementServiceMethodCleanup(
+static CMPIStatus LMI_PowerManagementServiceMethodCleanup(
CMPIMethodMI* mi,
const CMPIContext* cc,
CMPIBoolean term)
@@ -162,7 +162,7 @@ static CMPIStatus Cura_PowerManagementServiceMethodCleanup(
CMReturn(CMPI_RC_OK);
}
-static CMPIStatus Cura_PowerManagementServiceInvokeMethod(
+static CMPIStatus LMI_PowerManagementServiceInvokeMethod(
CMPIMethodMI* mi,
const CMPIContext* cc,
const CMPIResult* cr,
@@ -171,21 +171,21 @@ static CMPIStatus Cura_PowerManagementServiceInvokeMethod(
const CMPIArgs* in,
CMPIArgs* out)
{
- return Cura_PowerManagementService_DispatchMethod(
+ return LMI_PowerManagementService_DispatchMethod(
_cb, mi, cc, cr, cop, meth, in, out);
}
CMMethodMIStub(
- Cura_PowerManagementService,
- Cura_PowerManagementService,
+ LMI_PowerManagementService,
+ LMI_PowerManagementService,
_cb,
- Cura_PowerManagementServiceMethodInitialize(&mi))
+ LMI_PowerManagementServiceMethodInitialize(&mi))
-KUint32 Cura_PowerManagementService_RequestStateChange(
+KUint32 LMI_PowerManagementService_RequestStateChange(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_PowerManagementServiceRef* self,
+ const LMI_PowerManagementServiceRef* self,
const KUint16* RequestedState,
KRef* Job,
const KDateTime* TimeoutPeriod,
@@ -198,11 +198,11 @@ KUint32 Cura_PowerManagementService_RequestStateChange(
}
-KUint32 Cura_PowerManagementService_StartService(
+KUint32 LMI_PowerManagementService_StartService(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_PowerManagementServiceRef* self,
+ const LMI_PowerManagementServiceRef* self,
CMPIStatus* status)
{
KUint32 result = KUINT32_INIT;
@@ -211,11 +211,11 @@ KUint32 Cura_PowerManagementService_StartService(
return result;
}
-KUint32 Cura_PowerManagementService_StopService(
+KUint32 LMI_PowerManagementService_StopService(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_PowerManagementServiceRef* self,
+ const LMI_PowerManagementServiceRef* self,
CMPIStatus* status)
{
KUint32 result = KUINT32_INIT;
@@ -224,11 +224,11 @@ KUint32 Cura_PowerManagementService_StopService(
return result;
}
-KUint32 Cura_PowerManagementService_SetPowerState(
+KUint32 LMI_PowerManagementService_SetPowerState(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_PowerManagementServiceRef* self,
+ const LMI_PowerManagementServiceRef* self,
const KUint16* PowerState,
const KRef* ManagedElement,
const KDateTime* Time,
@@ -240,11 +240,11 @@ KUint32 Cura_PowerManagementService_SetPowerState(
return result;
}
-KUint32 Cura_PowerManagementService_RequestPowerStateChange(
+KUint32 LMI_PowerManagementService_RequestPowerStateChange(
const CMPIBroker* cb,
CMPIMethodMI* mi,
const CMPIContext* context,
- const Cura_PowerManagementServiceRef* self,
+ const LMI_PowerManagementServiceRef* self,
const KUint16* PowerState,
const KRef* ManagedElement,
const KDateTime* Time,
@@ -279,6 +279,6 @@ KUint32 Cura_PowerManagementService_RequestPowerStateChange(
KONKRET_REGISTRATION(
"root/cimv2",
- "Cura_PowerManagementService",
- "Cura_PowerManagementService",
+ "LMI_PowerManagementService",
+ "LMI_PowerManagementService",
"instance method")
diff --git a/src/power/power.c b/src/power/power.c
index bf22b1d..af4d124 100644
--- a/src/power/power.c
+++ b/src/power/power.c
@@ -22,8 +22,8 @@
#include <glib.h>
-#include "Cura_AssociatedPowerManagementService.h"
-#include "Cura_ConcreteJob.h"
+#include "LMI_AssociatedPowerManagementService.h"
+#include "LMI_ConcreteJob.h"
#ifdef HAS_UPOWER
#include <upower.h>
@@ -87,8 +87,8 @@ Power *power_new(const CMPIBroker *_cb)
Power *power = malloc(sizeof(Power));
power->broker = _cb;
power->instances = 0;
- power->requestedPowerState = Cura_AssociatedPowerManagementService_RequestedPowerState_Unknown;
- power->transitioningToPowerState = Cura_AssociatedPowerManagementService_TransitioningToPowerState_No_Change;
+ power->requestedPowerState = LMI_AssociatedPowerManagementService_RequestedPowerState_Unknown;
+ power->transitioningToPowerState = LMI_AssociatedPowerManagementService_TransitioningToPowerState_No_Change;
power->mutex = _cb->xft->newMutex(0);
power->jobs = NULL;
#ifdef HAS_UPOWER
@@ -142,7 +142,7 @@ void *state_change_thread(void *data)
{
PowerStateChangeJob *powerStateChangeJob = data;
MUTEX_LOCK(powerStateChangeJob);
- powerStateChangeJob->jobState = Cura_ConcreteJob_JobState_Running;
+ powerStateChangeJob->jobState = LMI_ConcreteJob_JobState_Running;
powerStateChangeJob->timeOfLastChange = time(NULL);
MUTEX_UNLOCK(powerStateChangeJob);
@@ -150,14 +150,14 @@ void *state_change_thread(void *data)
// Check if the job was cancelled
if (powerStateChangeJob->cancelled) {
MUTEX_LOCK(powerStateChangeJob);
- powerStateChangeJob->jobState = Cura_ConcreteJob_JobState_Terminated;
+ powerStateChangeJob->jobState = LMI_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 = Cura_AssociatedPowerManagementService_TransitioningToPowerState_No_Change;
+ powerStateChangeJob->power->transitioningToPowerState = LMI_AssociatedPowerManagementService_TransitioningToPowerState_No_Change;
MUTEX_UNLOCK(powerStateChangeJob->power);
}
@@ -172,7 +172,7 @@ void *state_change_thread(void *data)
int succeeded = 0;
switch (powerStateChangeJob->requestedPowerState) {
- case Cura_AssociatedPowerManagementService_PowerState_Sleep__Deep:
+ case LMI_AssociatedPowerManagementService_PowerState_Sleep__Deep:
// Sleep
#ifdef HAS_UPOWER
succeeded = up_client_suspend_sync(powerStateChangeJob->power->up, NULL, &error);
@@ -180,7 +180,7 @@ void *state_change_thread(void *data)
succeeded = system("pm-suspend") == 0;
#endif
break;
- case Cura_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft:
+ case LMI_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft:
// Reboot (without shutting down programs)
#ifdef HAS_SYSTEMCTL
succeeded = system("systemctl --force reboot &") == 0;
@@ -188,7 +188,7 @@ void *state_change_thread(void *data)
succeeded = system("reboot --force &") == 0;
#endif
break;
- case Cura_AssociatedPowerManagementService_PowerState_Hibernate_Off___Soft:
+ case LMI_AssociatedPowerManagementService_PowerState_Hibernate_Off___Soft:
// Hibernate
#ifdef HAS_UPOWER
succeeded = up_client_hibernate_sync(powerStateChangeJob->power->up, NULL, &error);
@@ -196,7 +196,7 @@ void *state_change_thread(void *data)
succeeded = system("pm-hibernate") == 0;
#endif
break;
- case Cura_AssociatedPowerManagementService_PowerState_Off___Soft:
+ case LMI_AssociatedPowerManagementService_PowerState_Off___Soft:
// Poweroff (without shutting down programs)
#ifdef HAS_SYSTEMCTL
succeeded = system("systemctl --force poweroff &") == 0;
@@ -204,7 +204,7 @@ void *state_change_thread(void *data)
succeeded = system("shutdown --halt now &") == 0;
#endif
break;
- case Cura_AssociatedPowerManagementService_PowerState_Off___Soft_Graceful:
+ case LMI_AssociatedPowerManagementService_PowerState_Off___Soft_Graceful:
// Poweroff (shut down programs first)
#ifdef HAS_SYSTEMCTL
succeeded = system("systemctl poweroff &") == 0;
@@ -212,7 +212,7 @@ void *state_change_thread(void *data)
succeeded = system("shutdown --poweroff now &") == 0;
#endif
break;
- case Cura_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft_Graceful:
+ case LMI_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft_Graceful:
// Reboot (shut down programs first)
#ifdef HAS_SYSTEMCTL
succeeded = system("systemctl reboot &") == 0;
@@ -223,14 +223,14 @@ void *state_change_thread(void *data)
}
MUTEX_LOCK(powerStateChangeJob->power);
- powerStateChangeJob->power->transitioningToPowerState = Cura_AssociatedPowerManagementService_TransitioningToPowerState_No_Change;
+ powerStateChangeJob->power->transitioningToPowerState = LMI_AssociatedPowerManagementService_TransitioningToPowerState_No_Change;
MUTEX_UNLOCK(powerStateChangeJob->power);
MUTEX_LOCK(powerStateChangeJob);
if (succeeded) {
- powerStateChangeJob->jobState = Cura_ConcreteJob_JobState_Completed;
+ powerStateChangeJob->jobState = LMI_ConcreteJob_JobState_Completed;
} else {
- powerStateChangeJob->jobState = Cura_ConcreteJob_JobState_Exception;
+ powerStateChangeJob->jobState = LMI_ConcreteJob_JobState_Exception;
#ifdef HAS_UPOWER
if (error != NULL) {
powerStateChangeJob->error = error->message;
@@ -267,7 +267,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 = Cura_ConcreteJob_JobState_New;
+ powerStateChangeJob->jobState = LMI_ConcreteJob_JobState_New;
powerStateChangeJob->cancelled = 0;
powerStateChangeJob->superseded = 0;
powerStateChangeJob->timeOfLastChange = time(NULL);
@@ -283,13 +283,13 @@ int power_request_power_state(Power *power, unsigned short state)
while (plist) {
job = plist->data;
MUTEX_LOCK(job);
- if (job->jobState != Cura_ConcreteJob_JobState_Suspended &&
- job->jobState != Cura_ConcreteJob_JobState_Killed &&
- job->jobState != Cura_ConcreteJob_JobState_Terminated) {
+ if (job->jobState != LMI_ConcreteJob_JobState_Suspended &&
+ job->jobState != LMI_ConcreteJob_JobState_Killed &&
+ job->jobState != LMI_ConcreteJob_JobState_Terminated) {
job->cancelled = 1;
job->superseded = 1;
- job->jobState = Cura_ConcreteJob_JobState_Shutting_Down;
+ job->jobState = LMI_ConcreteJob_JobState_Shutting_Down;
job->timeOfLastChange = time(NULL);
}
MUTEX_UNLOCK(job);
@@ -309,7 +309,7 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
int i = 0;
/* 1 Other
- * Cura_AssociatedPowerManagementService_PowerState_Other
+ * LMI_AssociatedPowerManagementService_PowerState_Other
*/
/* 2 On
@@ -317,7 +317,7 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
*
* Bring system to full On from any state (Sleep, Hibernate, Off)
*
- * Cura_AssociatedPowerManagementService_PowerState_On
+ * LMI_AssociatedPowerManagementService_PowerState_On
*/
// not supported
@@ -326,7 +326,7 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
*
* Standby
*
- * Cura_AssociatedPowerManagementService_PowerState_Sleep___Light
+ * LMI_AssociatedPowerManagementService_PowerState_Sleep___Light
*/
// not supported
@@ -335,16 +335,16 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
*
* Suspend
*
- * Cura_AssociatedPowerManagementService_PowerState_Sleep__Deep
+ * LMI_AssociatedPowerManagementService_PowerState_Sleep__Deep
*/
// Sleep
#ifdef HAS_UPOWER
if (up_client_get_can_suspend(power->up)) {
- list[i++] = Cura_AssociatedPowerManagementService_PowerState_Sleep__Deep;
+ list[i++] = LMI_AssociatedPowerManagementService_PowerState_Sleep__Deep;
}
#else
if (system("pm-is-supported --suspend") == 0) {
- list[i++] = Cura_AssociatedPowerManagementService_PowerState_Sleep__Deep;
+ list[i++] = LMI_AssociatedPowerManagementService_PowerState_Sleep__Deep;
}
#endif
@@ -354,10 +354,10 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
*
* Reset system without removing power
*
- * Cura_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft
+ * LMI_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft
*/
// Reboot (without shutting down programs)
- list[i++] = Cura_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft;
+ list[i++] = LMI_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft;
/* 6 Off - Hard
* corresponding to ACPI state G3, S5, or D3.
@@ -365,7 +365,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
*
- * Cura_AssociatedPowerManagementService_PowerState_Off___Hard
+ * LMI_AssociatedPowerManagementService_PowerState_Off___Hard
*/
/* 7 Hibernate (Off - Soft)
@@ -375,16 +375,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
*
- * Cura_AssociatedPowerManagementService_PowerState_Hibernate_Off___Soft
+ * LMI_AssociatedPowerManagementService_PowerState_Hibernate_Off___Soft
*/
// Hibernate
#ifdef HAS_UPOWER
if (up_client_get_can_hibernate(power->up)) {
- list[i++] = Cura_AssociatedPowerManagementService_PowerState_Hibernate_Off___Soft;
+ list[i++] = LMI_AssociatedPowerManagementService_PowerState_Hibernate_Off___Soft;
}
#else
if (system("pm-is-supported --hibernate") == 0) {
- list[i++] = Cura_AssociatedPowerManagementService_PowerState_Hibernate_Off___Soft;
+ list[i++] = LMI_AssociatedPowerManagementService_PowerState_Hibernate_Off___Soft;
}
#endif
@@ -393,10 +393,10 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
*
* System power off but auxiliary or flea power may be available
*
- * Cura_AssociatedPowerManagementService_PowerState_Off___Soft
+ * LMI_AssociatedPowerManagementService_PowerState_Off___Soft
*/
// Poweroff (without shutting down programs)
- list[i++] = Cura_AssociatedPowerManagementService_PowerState_Off___Soft;
+ list[i++] = LMI_AssociatedPowerManagementService_PowerState_Off___Soft;
/* 9 Power Cycle (Off-Hard)
* corresponds to the managed element reaching the ACPI state G3
@@ -404,7 +404,7 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
*
* Equivalent to Off–Hard followed by On
*
- * Cura_AssociatedPowerManagementService_PowerState_Power_Cycle_Off_Hard
+ * LMI_AssociatedPowerManagementService_PowerState_Power_Cycle_Off_Hard
*/
// not implemented
@@ -414,7 +414,7 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
*
* Hardware reset
*
- * Cura_AssociatedPowerManagementService_PowerState_Master_Bus_Reset
+ * LMI_AssociatedPowerManagementService_PowerState_Master_Bus_Reset
*/
// not implemented
@@ -424,7 +424,7 @@ unsigned short *power_available_requested_power_states(Power *power, int *count)
*
* Hardware reset
*
- * Cura_AssociatedPowerManagementService_PowerState_Diagnostic_Interrupt_NMI
+ * LMI_AssociatedPowerManagementService_PowerState_Diagnostic_Interrupt_NMI
*/
// not implemented
@@ -435,10 +435,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.
*
- * Cura_AssociatedPowerManagementService_PowerState_Off___Soft_Graceful
+ * LMI_AssociatedPowerManagementService_PowerState_Off___Soft_Graceful
*/
// Poweroff (shut down programs first)
- list[i++] = Cura_AssociatedPowerManagementService_PowerState_Off___Soft_Graceful;
+ list[i++] = LMI_AssociatedPowerManagementService_PowerState_Off___Soft_Graceful;
/* 13 Off - Hard Graceful
* equivalent to Off Hard but preceded by a request to the managed element
@@ -448,7 +448,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.
*
- * Cura_AssociatedPowerManagementService_PowerState_Off___Hard_Graceful
+ * LMI_AssociatedPowerManagementService_PowerState_Off___Hard_Graceful
*/
// not implemented
@@ -459,7 +459,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.
*
- * Cura_AssociatedPowerManagementService_PowerState_Master_Bus_Reset_Graceful
+ * LMI_AssociatedPowerManagementService_PowerState_Master_Bus_Reset_Graceful
*/
// not implemented
@@ -470,10 +470,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.
*
- * Cura_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft_Graceful
+ * LMI_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft_Graceful
*/
// Reboot (shut down programs first)
- list[i++] = Cura_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft_Graceful;
+ list[i++] = LMI_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Soft_Graceful;
/* 16 Power Cycle (Off - Hard Graceful)
* equivalent to Power Cycle (Off - Hard) but preceded by a request
@@ -482,7 +482,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.
*
- * Cura_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Hard_Graceful
+ * LMI_AssociatedPowerManagementService_PowerState_Power_Cycle_Off___Hard_Graceful
*/
// not implemented
@@ -502,9 +502,9 @@ GList *power_get_jobs(Power *power)
while (plist) {
powerStateChangeJob = plist->data;
MUTEX_LOCK(powerStateChangeJob);
- if ((powerStateChangeJob->jobState == Cura_ConcreteJob_JobState_Completed ||
- powerStateChangeJob->jobState == Cura_ConcreteJob_JobState_Killed ||
- powerStateChangeJob->jobState == Cura_ConcreteJob_JobState_Terminated) &&
+ if ((powerStateChangeJob->jobState == LMI_ConcreteJob_JobState_Completed ||
+ powerStateChangeJob->jobState == LMI_ConcreteJob_JobState_Killed ||
+ powerStateChangeJob->jobState == LMI_ConcreteJob_JobState_Terminated) &&
time(NULL) - powerStateChangeJob->timeOfLastChange > powerStateChangeJob->timeBeforeRemoval) {
MUTEX_LOCK(power);