1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-05-14 09:09:28 +00:00
Purism-Calls/src/calls-emergency-call-types.h
Guido Günther edb46acfa5 emergency-call-types: Add location source
We named it fallback but location is a better name as we get it
from the current country code.
2024-02-10 17:09:48 +01:00

37 lines
1.2 KiB
C

/*
* Copyright (C) 2022 Guido Günther
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#include <glib.h>
# pragma once
/**
* CallsEmergencyContactSource:
*
* Source of the emergency numbers:
*
* CALLS_EMERGENCY_CONTACT_SOURCE_UNKNOWN: No idea where it came from
* CALLS_EMERGENCY_CONTACT_SOURCE_LOCATION: Based on the devices current location
* CALLS_EMERGENCY_CONTACT_SOURCE_SIM: Based on information on the SIM card
*/
typedef enum {
CALLS_EMERGENCY_CONTACT_SOURCE_UNKNOWN = 0,
CALLS_EMERGENCY_CONTACT_SOURCE_LOCATION = (1 << 0),
CALLS_EMERGENCY_CONTACT_SOURCE_SIM = (1 << 1),
} CallsEmergencyContactSource;
/* See 3GPP TS 22.101 version 14.8.0 Release 14, Chapter 10.1 */
typedef enum {
CALLS_EMERGENCY_CALL_TYPE_UNKNOWN = 0,
CALLS_EMERGENCY_CALL_TYPE_POLICE = (1 << 0),
CALLS_EMERGENCY_CALL_TYPE_AMBULANCE = (1 << 1),
CALLS_EMERGENCY_CALL_TYPE_FIRE_BRIGADE = (1 << 2),
CALLS_EMERGENCY_CALL_TYPE_MOUNTAIN_RESCUE = (1 << 3),
} CallsEmergencyCallTypeFlags;
char *calls_emergency_call_type_get_name (const char *number, const char *country_code);
GStrv calls_emergency_call_types_get_numbers_by_country_code (const char *country_code);