forked from enlightenment/enlightenment
Enum with all caps values.
This commit is contained in:
parent
43b233348a
commit
a139e88811
|
@ -5,7 +5,7 @@
|
|||
#ifndef E_GADGET_CONVERTIBLE_IIO_SENSOR_ACCELEROMETER_H
|
||||
#define E_GADGET_CONVERTIBLE_IIO_SENSOR_ACCELEROMETER_H
|
||||
|
||||
// Those costants are the possible states for the orientation of the acceleromenter.
|
||||
// Those costants are the possible states for the orientation of the accelerometer.
|
||||
|
||||
#define ACCELEROMETER_ORIENTATION_UNDEFINED "undefined"
|
||||
#define ACCELEROMETER_ORIENTATION_NORMAL "normal"
|
||||
|
|
|
@ -126,7 +126,7 @@ access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant,
|
|||
{
|
||||
WARN("Unable to get the type.");
|
||||
*result = EINA_FALSE;
|
||||
return undefined;
|
||||
return UNDEFINED;
|
||||
}
|
||||
|
||||
type = eldbus_message_iter_signature_get((*variant));
|
||||
|
@ -148,15 +148,15 @@ access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant,
|
|||
*result = EINA_FALSE;
|
||||
}
|
||||
|
||||
enum screen_rotation rotation = undefined;
|
||||
enum screen_rotation rotation = UNDEFINED;
|
||||
if (strcmp(ACCELEROMETER_ORIENTATION_RIGHT, *string_property_value) == 0)
|
||||
rotation = right_up;
|
||||
rotation = RIGHT_UP;
|
||||
if (strcmp(ACCELEROMETER_ORIENTATION_LEFT, *string_property_value) == 0)
|
||||
rotation = left_up;
|
||||
rotation = LEFT_UP;
|
||||
if (strcmp(ACCELEROMETER_ORIENTATION_BOTTOM, *string_property_value) == 0)
|
||||
rotation = flipped;
|
||||
rotation = FLIPPED;
|
||||
if (strcmp(ACCELEROMETER_ORIENTATION_NORMAL, *string_property_value) == 0)
|
||||
rotation = normal;
|
||||
rotation = NORMAL;
|
||||
|
||||
free(type);
|
||||
free(string_property_value);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#define EFL_DBUS_ACC_IFACE "net.hadess.SensorProxy"
|
||||
|
||||
// This enum represents the 4 states of screen rotation plus undefined
|
||||
enum screen_rotation {undefined, normal, right_up, flipped, left_up};
|
||||
enum screen_rotation {UNDEFINED, NORMAL, RIGHT_UP, FLIPPED, LEFT_UP};
|
||||
|
||||
typedef struct _DbusAccelerometer DbusAccelerometer;
|
||||
|
||||
|
|
Loading…
Reference in New Issue