power: Add type casting to support architecture-independent API porting. 19/300919/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:13:17 +0000 (14:13 +0900)
commitb3e98c656725604ec1d8dff5f06e1d96c07325b7
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