

/*****************		LCS		**************

#define	AC_locationServiceGateWay			37

#define	AC_locationServiceEnquiry			38



#define	RoutingInfoForLCS					85

#define	ProvideSubscriberLocation			83

****************		LCS		**************/



typedef struct _SubscriberIdentity

{	

	u8				identityChoice;			/*1:imsi,2:msisdn*/

	u8				msisdn[ISDN_LEN+1];		/* TBCD */

	u8				imsi[IMSI_LEN+1];		/* TBCD */					

}SubscriberIdentity;



typedef struct	_MapRoutingInfoForLCS_Arg		

{

	u32						param_flag;

	u8						mlcNumber[ISDN_LEN+1];	/* TBCD */

	SubscriberIdentity		targetMs;

	u8						user_error;

	u8						provider_error;

}RoutingInfoForLCS_Arg;



typedef struct	_MapRoutingInfoForLCS_Res	

{

	u32						param_flag;

	SubscriberIdentity		targetMs;

	u8						mscNumber[ISDN_LEN+1];	/* TBCD */	

	u8						user_error;

	u8						provider_error;

}RoutingInfoForLCS_Res;





typedef enum _LocationEstimateType

{

	currentLocation = 0,

	currentOrLastKnownLocation,

	initialLocation,

	activateDeferredLocation,

	cancelDeferredLocation,

	notificationVerificationOnly

}LocationEstimateType;



typedef enum _DeferredLocationEventType

{

	msAvailable = 0,

	enteringIntoArea,

	leavingFromArea,

	beingInsideArea,

	periodicLDR

}DeferredLocationEventType;



typedef struct	_LocationType

{

	LocationEstimateType				locationEstimateType;

	DeferredLocationEventType			deferredLocationEventType;

}LocationType;



typedef struct	_ProvideSubscriberLocation_Arg		

{

	u32								param_flag;

	LocationType					locationType;

	u8								mlcNumber[ISDN_LEN+1];	/* TBCD */

	u8								msisdn[ISDN_LEN+1];		/* TBCD */

	u8								imsi[IMSI_LEN+1];		/* TBCD */

	u8								user_error;

	u8								provider_error;

}ProvideSubscriberLocation_Arg;



typedef enum _TypeOfShape

{

	EllipsoidPoint 										= 0,

	EllipsoidPointWithUncertaintyCircle					= 1,

	EllipsoidPointWithUncertaintyEllipse				= 3,

	Polygon												= 5,

	EllipsoidPointWithAltitude							= 8,

	EllipsoidPointWithAltitudeAndUncertaintyEllipsoid 	= 9,

	EllipsoidArc										=10

}TypeOfShape;





#define	maxExtGeographicalInformation					20

typedef struct _LocationEstimate

{

	TypeOfShape	typeOfShape;/*	only support EllipsoidPoint	*/

	long		degreesOfLatitude;	

	long		degreesOfLongitude;

	u8			reserve[maxExtGeographicalInformation - 7];

}LocationEstimate;





typedef enum _CgiSaiOrLaiChoice

{

	CgiOrSai 	= 1,

	LAI			= 2	

}CgiSaiOrLaiChoice;



typedef struct _CGI

{

	CgiSaiOrLaiChoice		cgiOrLaiChoice;

/*

-- octet 1 bits 4321 Mobile Country Code 1st digit

-- bits 8765 Mobile Country Code 2nd digit

-- octet 2 bits 4321 Mobile Country Code 3rd digit

-- bits 8765 Mobile Network Code 3rd digit

-- or filler (1111) for 2 digit MNCs

-- octet 3 bits 4321 Mobile Network Code 1st digit

-- bits 8765 Mobile Network Code 2nd digit

-- octets 4 and 5 Location Area Code according to 3GPP TS 24.008

-- octets 6 and 7 Cell Identity (CI) value or

-- Service Area Code (SAC) value

-- according to 3GPP TS 23.003

*/

	u8		mccMnc[3];	/*	tbcd	*/

	u16		lac;	/*	integer	*/

	u16		cellId;	/*	integer	*/

}CGI;



typedef struct	_ProvideSubscriberLocation_Res	

{

	u32								param_flag;

	LocationEstimate 				locationEstimate;

	CGI								cgi;

	u8								user_error;

	u8								provider_error;	

}ProvideSubscriberLocation_Res;





