elocation: Check if the passed in address/position/status is already up to date
This API needs to get rewritten when the GeoClue2 support lands.
This commit is contained in:
parent
510773a99d
commit
821d68ded1
|
@ -1106,6 +1106,7 @@ EAPI Eina_Bool
|
|||
elocation_address_get(Elocation_Address *address_shadow)
|
||||
{
|
||||
if (!address) return EINA_FALSE;
|
||||
if (address == address_shadow) return EINA_TRUE;
|
||||
|
||||
address_shadow = address;
|
||||
return EINA_TRUE;
|
||||
|
@ -1116,6 +1117,7 @@ EAPI Eina_Bool
|
|||
elocation_position_get(Elocation_Position *position_shadow)
|
||||
{
|
||||
if (!position) return EINA_FALSE;
|
||||
if (position == position_shadow) return EINA_TRUE;
|
||||
|
||||
position_shadow = position;
|
||||
return EINA_TRUE;
|
||||
|
@ -1126,6 +1128,7 @@ EAPI Eina_Bool
|
|||
elocation_status_get(int *status_shadow)
|
||||
{
|
||||
if (status < 0) return EINA_FALSE;
|
||||
if (&status == status_shadow) return EINA_TRUE;
|
||||
|
||||
status_shadow = &status;
|
||||
return EINA_TRUE;
|
||||
|
|
Loading…
Reference in New Issue