Top |
FolksLocationFolksLocation — A location. Typically latitude and longitude will be based on WGS84. However, folks often has no way of verifying that and just has to assume it's true. |
struct | FolksLocation |
struct | FolksLocationClass |
FolksLocationDetails | |
struct | FolksLocationDetailsIface |
#define FOLKS_TYPE_LOCATION (folks_location_get_type ())
The type for FolksLocation.
gboolean folks_location_equal (FolksLocation *self
,FolksLocation *other
);
Compare this location to another by geographical position.
Since 0.9.2
gboolean folks_location_equal_coordinates (FolksLocation *self
,gdouble latitude
,gdouble longitude
);
Compare the geographical position of this location against another position.
self |
the FolksLocation instance |
|
latitude |
. latitude of the other position . |
[in] |
longitude |
. longitude of the other position . |
[in] |
Since 0.9.2
FolksLocation * folks_location_new (gdouble latitude
,gdouble longitude
);
Constructs a new instance with the given coordinates.
latitude |
. latitude of the new instance . |
[in] |
longitude |
. longitude of the new instance . |
[in] |
Since 0.9.2
void folks_location_details_change_location (FolksLocationDetails *self
,FolksLocation *location
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Set or remove the contact's currently advertised location.
It's preferred to call this rather than setting "location" directly, as this method gives error notification and will only return once the location has been written to the relevant backing store (or the operation's failed).
FolksPropertyError will be returned in error
if setting the location failed
See also: folks_location_details_change_location_finish()
self |
the FolksLocationDetails instance |
|
location |
. the contact's location, null to remove the information . |
[in][allow-none] |
_callback_ |
callback to call when the request is satisfied. |
[scope async] |
_user_data_ |
the data to pass to |
[closure] |
Since 0.9.2
void folks_location_details_change_location_finish (FolksLocationDetails *self
,GAsyncResult *_res_
,GError **error
);
Set or remove the contact's currently advertised location.
It's preferred to call this rather than setting "location" directly, as this method gives error notification and will only return once the location has been written to the relevant backing store (or the operation's failed).
FolksPropertyError will be returned in error
if setting the location failed
See also: folks_location_details_change_location()
self |
the FolksLocationDetails instance |
|
_res_ |
||
error |
location to store the error occuring, or |
[error-domains FolksPropertyError] |
Since 0.9.2
FolksLocation *
folks_location_details_get_location (FolksLocationDetails *self
);
Get and return the current value of the "location" property.
The current location of the contact. Null if the contact’s current location isn’t known, or they’re keeping it private.
Since 0.9.2
void folks_location_details_set_location (FolksLocationDetails *self
,FolksLocation *value
);
Set the value of the "location" property to value
.
The current location of the contact. Null if the contact’s current location isn’t known, or they’re keeping it private.
self |
the FolksLocationDetails instance to modify |
|
value |
the new value of the "location" property |
Since 0.9.2
struct FolksLocation;
A location. Typically latitude and longitude will be based on WGS84. However, folks often has no way of verifying that and just has to assume it's true.
Since 0.9.2
struct FolksLocationClass { GObjectClass parent_class; };
The class structure for FOLKS_TYPE_LOCATION
. All the fields in this structure are private and should never be accessed directly.
typedef struct _FolksLocationDetails FolksLocationDetails;
Location of a contact. folks tries to keep track of the current location and thus favors live data (say, as advertised by a chat service) over static data (from an address book). Static addresses, such as a contact's home or work address, should be presented using the FolksPostalAddressDetails interface. FolksLocationDetails is purely for exposing the contact's current or recent location.
Backends are expected to report only relevant changes in a persona's location. For storage backends like EDS, all changes must have been triggered by a person (e.g. editing the contact) and thus all are relevant.
A backend pulling in live data, for example from a GPS, is expected to filter the data to minimize noise.
folks itself will then apply all changes coming from backends without further filtering.
Since 0.9.2
struct FolksLocationDetailsIface { GTypeInterface parent_iface; void (*change_location) (FolksLocationDetails* self, FolksLocation* location, GAsyncReadyCallback _callback_, gpointer _user_data_); void (*change_location_finish) (FolksLocationDetails* self, GAsyncResult* _res_, GError** error); FolksLocation* (*get_location) (FolksLocationDetails* self); void (*set_location) (FolksLocationDetails* self, FolksLocation* value); };
Interface for creating FolksLocationDetails implementations.
GTypeInterface |
the parent interface structure |
|
virtual method called by |
||
asynchronous finish function for |
||
getter method for the abstract property "location" |
||
setter method for the abstract property "location" |
“location”
property“location” FolksLocation *
The current location of the contact. Null if the contact’s current location isn’t known, or they’re keeping it private.
Flags: Read / Write
Since 0.9.2