power: Add type casting to support architecture-independent API porting. 22/300922/1
authorYunhee Seo <yuni.seo@samsung.com>
Fri, 3 Nov 2023 08:36:13 +0000 (17:36 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Mon, 6 Nov 2023 05:15:49 +0000 (14:15 +0900)
commit813a98c54af85705a6bb5cc150c769efc218b421
treec80d623079b276d71dd626f2e6f4af3294d579be
parent14e7b3118e1995970145ef37dbd9866442da5019
power: Add type casting to support architecture-independent API porting.

At first, in the 32bit architecture, power state enum value is treated as 4 byte.
Thus, when dealing with enum value, the type should be converted to unsigned int or int.
Especially, this is necessary for C# API porting in the 32bit architecture to avoid abnormal operation.
However, when the device_power_change_state uses dbus call, it treats enum value as uint64_t in the g_variant type.
To make correct type conversion in g_variant, uint64_t type conversion is needed also.

Change-Id: I2e9ef7a715ca5beb13f358e183f5b054cff86ce1
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
src/power-internal.c