Truxton sensitive site list add
This makes an entry in the list.
It creates a record in the [SensitiveSite] table.
Contents
Syntax
int truxton_sensitive_site_list_add( uint64_t ssl_handle, double latitude, double longitude, double distance_in_meters, char const* name, char const* id);
Parameters
ssl_handle
The handle to the list object.
This handle comes from calling truxton_sensitive_site_list_create().
latitude
The latitude in decimal degrees using the WGS84 ellipsoid.
It corresponds to the [Latitude] column of the [SensitiveSite] table.
longitude
The longitude in decimal degrees using the WGS84 ellipsoid.
It corresponds to the [Longitude] column of the [SensitiveSite] table.
distance_in_meters
The distance in meters of the zone that should not be entered.
It corresponds to the [Distance] column of the [SensitiveSite] table.
name
The name of the location.
It corresponds to the [Name] column of the [SensitiveSite] table.
id
The string representation of a GUID.
Every site should have a unique identifier.
If this value is an empty string or NULL, a random identifier will be generated for you.
Return value
A non-zero value on success, zero on failure.
Sample
void create_list( uint64_t truxton )
{
uint64_t ssl = truxton_sensitive_site_list_create( truxton );
truxton_sensitive_site_list_set_id( ssl, "ED1E0F5E-1AD0-7A14-A053-04D8DB47BC4C" );
truxton_sensitive_site_list_set_name( ssl, "A couple of places" );
truxton_sensitive_site_list_set_description( ssl, "My list of places" );
// Commit the data to the database
truxton_sensitive_site_list_save( ssl );
// Now add some sites to our list
truxton_sensitive_site_list_add( ssl, 39.136001, -77.701114, 100, "Lothar's", NULL );
truxton_sensitive_site_list_add( ssl, 28.421, -81.57985, 100, "Illegal Fishing HQ", "22222222-0000-0000-0000-000000000000");
truxton_sensitive_site_list_destroy( ssl );
}