include: move auth_method and proto enumerations

ofono_gprs_proto and ofono_gprs_auth_method, and related length consts,
moved to types.h from gprs-context.h,
so that they can be shared also with lte core functions
This commit is contained in:
Giacinto Cifelli 2018-10-09 21:32:41 +02:00 committed by Denis Kenzior
parent d9e3329f55
commit 93caa4ceef
2 changed files with 21 additions and 21 deletions

View File

@ -31,21 +31,6 @@ extern "C" {
struct ofono_gprs_context;
struct ofono_modem;
/*
* ETSI 123.003, Section 9.1:
* the APN has, after encoding as defined in the paragraph below, a maximum
* length of 100 octets
*/
#define OFONO_GPRS_MAX_APN_LENGTH 100
#define OFONO_GPRS_MAX_USERNAME_LENGTH 63
#define OFONO_GPRS_MAX_PASSWORD_LENGTH 255
enum ofono_gprs_proto {
OFONO_GPRS_PROTO_IP = 0,
OFONO_GPRS_PROTO_IPV6,
OFONO_GPRS_PROTO_IPV4V6,
};
enum ofono_gprs_context_type {
OFONO_GPRS_CONTEXT_TYPE_ANY = 0,
OFONO_GPRS_CONTEXT_TYPE_INTERNET,
@ -54,12 +39,6 @@ enum ofono_gprs_context_type {
OFONO_GPRS_CONTEXT_TYPE_IMS,
};
enum ofono_gprs_auth_method {
OFONO_GPRS_AUTH_METHOD_CHAP = 0,
OFONO_GPRS_AUTH_METHOD_PAP,
OFONO_GPRS_AUTH_METHOD_NONE,
};
struct ofono_gprs_primary_context {
unsigned int cid;
char apn[OFONO_GPRS_MAX_APN_LENGTH + 1];

View File

@ -122,6 +122,27 @@ struct ofono_uuid {
unsigned char uuid[OFONO_SHA1_UUID_LEN];
};
/*
* ETSI 123.003, Section 9.1:
* the APN has, after encoding as defined in the paragraph below, a maximum
* length of 100 octets
*/
#define OFONO_GPRS_MAX_APN_LENGTH 100
#define OFONO_GPRS_MAX_USERNAME_LENGTH 63
#define OFONO_GPRS_MAX_PASSWORD_LENGTH 255
enum ofono_gprs_proto {
OFONO_GPRS_PROTO_IP = 0,
OFONO_GPRS_PROTO_IPV6,
OFONO_GPRS_PROTO_IPV4V6,
};
enum ofono_gprs_auth_method {
OFONO_GPRS_AUTH_METHOD_CHAP = 0,
OFONO_GPRS_AUTH_METHOD_PAP,
OFONO_GPRS_AUTH_METHOD_NONE,
};
const char *ofono_uuid_to_str(const struct ofono_uuid *uuid);
void ofono_call_init(struct ofono_call *call);