//Source file: mm.idl
//Date:  13 February 2002
//Mobility for ETSI ES 201 915-6 v.1.2.1, Parlay 3.1


#ifndef __MM_DEFINED
#define __MM_DEFINED



#include "osa.idl"

module org {
	
	module csapi {
		
		module mm {
			
			enum TpLocationPriority {

				
				P_M_NORMAL,
				
				P_M_HIGH				
			};
			
			enum TpLocationResponseIndicator {

				
				P_M_NO_DELAY,
				
				P_M_LOW_DELAY,
				
				P_M_DELAY_TOLERANT,
				
				P_M_USE_TIMER_VALUE				
			};
			
			struct TpLocationResponseTime {
				TpLocationResponseIndicator ResponseTime;
				
				TpInt32 TimerValue;
				
				
			};
			
			enum TpLocationTriggerCriteria {

				
				P_UL_ENTERING_AREA,
				
				P_UL_LEAVING_AREA				
			};
			
			struct TpLocationTrigger {
				TpFloat Longitude;
				
				TpFloat Latitude;
				
				TpFloat AreaSemiMajor;
				
				TpFloat AreaSemiMinor;
				
				TpInt32 AngleOfSemiMajor;
				
				TpLocationTriggerCriteria Criterion;
				
				TpDuration ReportingInterval;
				
				
			};
			
			typedef sequence <TpLocationTrigger> TpLocationTriggerSet;
			
			enum TpLocationType {

				
				P_M_CURRENT,
				
				P_M_CURRENT_OR_LAST_KNOWN,
				
				P_M_INITIAL				
			};
			
			
			
			struct TpLocationRequest {
				TpFloat RequestedAccuracy;
				
				TpLocationResponseTime RequestedResponseTime;
				
				TpBoolean AltitudeRequested;
				
				TpLocationType Type;
				
				TpLocationPriority Priority;
				
				TpString RequestedLocationMethod;
				
				
			};
			
			enum TpLocationUncertaintyShape {

				
				P_M_SHAPE_NONE,
				
				P_M_SHAPE_CIRCLE,
				
				P_M_SHAPE_CIRCLE_SECTOR,
				
				P_M_SHAPE_CIRCLE_ARC_STRIPE,
				
				P_M_SHAPE_ELLIPSE,
				
				P_M_SHAPE_ELLIPSE_SECTOR,
				
				P_M_SHAPE_ELLIPSE_ARC_STRIPE				
			};
			
			struct TpGeographicalPosition {
				TpFloat Longitude;
				
				TpFloat Latitude;
				
				TpLocationUncertaintyShape TypeOfUncertaintyShape;
				
				TpFloat UncertaintyInnerSemiMajor;
				
				TpFloat UncertaintyOuterSemiMajor;
				
				TpFloat UncertaintyInnerSemiMinor;
				
				TpFloat UncertaintyOuterSemiMinor;
				
				TpInt32 AngleOfSemiMajor;
				
				TpInt32 SegmentStartAngle;
				
				TpInt32 SegmentEndAngle;
				
				
			};
			
			
			
			enum TpMobilityDiagnostic {

				
				P_M_NO_INFORMATION,
				
				P_M_APPL_NOT_IN_PRIV_EXCEPT_LST,
				
				P_M_CALL_TO_USER_NOT_SETUP,
				
				P_M_PRIVACY_OVERRIDE_NOT_APPLIC,
				
				P_M_DISALL_BY_LOCAL_REGULAT_REQ,
				
				P_M_CONGESTION,
				
				P_M_INSUFFICIENT_RESOURCES,
				
				P_M_INSUFFICIENT_MEAS_DATA,
				
				P_M_INCONSISTENT_MEAS_DATA,
				
				P_M_LOC_PROC_NOT_COMPLETED,
				
				P_M_LOC_PROC_NOT_SUPP_BY_USER,
				
				P_M_QOS_NOT_ATTAINABLE				
			};
			
			
			
			enum TpMobilityError {

				
				P_M_OK,
				
				P_M_SYSTEM_FAILURE,
				
				P_M_UNAUTHORIZED_NETWORK,
				
				P_M_UNAUTHORIZED_APPLICATION,
				
				P_M_UNKNOWN_SUBSCRIBER,
				
				P_M_ABSENT_SUBSCRIBER,
				
				P_M_POSITION_METHOD_FAILURE				
			};
			
			enum TpMobilityStopScope {

				
				P_M_ALL_IN_ASSIGNMENT,
				
				P_M_SPECIFIED_USERS				
			};
			
			struct TpMobilityStopAssignmentData {
				
				TpSessionID AssignmentId;
				
				TpMobilityStopScope StopScope;
				
				TpAddressSet Users;
				
				
			};
			
			enum TpTerminalType {

				
				P_M_FIXED,
				
				P_M_MOBILE,
				
				P_M_IP				
			};
			
			struct TpUlExtendedData {
				TpGeographicalPosition GeographicalPosition;
				
				TpTerminalType TerminalType;
				
				TpBoolean AltitudePresent;
				
				TpFloat Altitude;
				
				TpFloat UncertaintyAltitude;
				
				TpBoolean TimestampPresent;
				
				TpDateAndTime Timestamp;
				
				TpString UsedLocationMethod;
				
				
			};
			
			typedef sequence <TpUlExtendedData> TpUlExtendedDataSet;
			
			struct TpUserLocation {
				TpAddress UserID;
				
				TpMobilityError StatusCode;
				
				TpGeographicalPosition GeographicalPosition;
				
				
			};
			
			struct TpUserLocationExtended {
				TpAddress UserID;
				
				TpMobilityError StatusCode;
				
				TpUlExtendedDataSet Locations;
				
				
			};
			
			typedef sequence <TpUserLocationExtended> TpUserLocationExtendedSet;
			
			typedef sequence <TpUserLocation> TpUserLocationSet;
			
			typedef TpString TpLocationCellIDOrLAI;
			
			struct TpLocationTriggerCamel {
				TpBoolean UpdateInsideVlr;
				
				TpBoolean UpdateOutsideVlr;
				
				
			};
			
			struct TpUserLocationCamel {
				TpAddress UserID;
				
				TpMobilityError StatusCode;
				
				TpBoolean GeographicalPositionPresent;
				
				TpGeographicalPosition GeographicalPosition;
				
				TpBoolean TimestampPresent;
				
				TpDateAndTime Timestamp;
				
				TpBoolean VlrNumberPresent;
				
				TpAddress VlrNumber;
				
				TpBoolean LocationNumberPresent;
				
				TpAddress LocationNumber;
				
				TpBoolean CellIdOrLaiPresent;
				
				TpLocationCellIDOrLAI CellIdOrLai;
				
				
			};
			
			typedef sequence <TpUserLocationCamel> TpUserLocationCamelSet;
			
			typedef TpString TpIMEI;
			
			typedef TpString TpNaESRD;
			
			typedef TpString TpNaESRK;
			
			struct TpUserLocationEmergencyRequest {
				TpBoolean UserAddressPresent;
				
				TpAddress UserAddress;
				
				TpBoolean NaEsrdPresent;
				
				TpNaESRD NaEsrd;
				
				TpBoolean NaEsrkPresent;
				
				TpNaESRK NaEsrk;
				
				TpBoolean ImeiPresent;
				
				TpIMEI Imei;
				
				TpLocationRequest LocationReq;
				
				
			};
			
			enum TpUserLocationEmergencyTrigger {

				
				P_ULE_CALL_ORIGINATION,
				
				P_ULE_CALL_RELEASE,
				
				P_ULE_LOCATION_REQUEST				
			};
			
			struct TpUserLocationEmergency {
				TpMobilityError StatusCode;
				
				TpBoolean UserIdPresent;
				
				TpAddress UserId;
				
				TpBoolean NaEsrdPresent;
				
				TpNaESRD NaEsrd;
				
				TpBoolean NaEsrkPresent;
				
				TpNaESRK NaEsrk;
				
				TpBoolean ImeiPresent;
				
				TpIMEI Imei;
				
				TpUserLocationEmergencyTrigger TriggeringEvent;
				
				TpBoolean GeographicalPositionPresent;
				
				TpGeographicalPosition GeographicalPosition;
				
				TpBoolean AltitudePresent;
				
				TpFloat Altitude;
				
				TpFloat UncertaintyAltitude;
				
				TpBoolean TimestampPresent;
				
				TpDateAndTime Timestamp;
				
				TpString UsedLocationMethod;
				
				
			};
			
			enum TpUserStatusIndicator {

				
				P_US_REACHABLE,
				
				P_US_NOT_REACHABLE,
				
				P_US_BUSY				
			};
			
			struct TpUserStatus {
				TpAddress UserID;
				
				TpMobilityError StatusCode;
				
				TpUserStatusIndicator Status;
				
				TpTerminalType TerminalType;
				
				
			};
			
			typedef sequence <TpUserStatus> TpUserStatusSet;
			
			exception P_REQUESTED_ACCURACY_CANNOT_BE_DELIVERED {
				TpString ExtraInformation;
			};
			
			exception P_REQUESTED_RESPONSE_TIME_CANNOT_BE_DELIVERED {
				TpString ExtraInformation;
			};
			
			exception P_INVALID_REPORTING_INTERVAL {
				TpString ExtraInformation;
			};
			
			exception P_TRIGGER_CONDITIONS_NOT_SUBSCRIBED {
				TpString ExtraInformation;
			};
			
			
			
			module ul {
				
				
				
				interface IpAppUserLocation : IpInterface {
					
					void locationReportRes (
						in TpSessionID assignmentId,	
						in TpUserLocationSet locations	
						);
						
					
					void locationReportErr (
						in TpSessionID assignmentId,	
						in TpMobilityError cause,	
						in TpMobilityDiagnostic diagnostic	
						);
						
					
					void extendedLocationReportRes (
						in TpSessionID assignmentId,	
						in TpUserLocationExtendedSet locations	
						);
						
					
					void extendedLocationReportErr (
						in TpSessionID assignmentId,	
						in TpMobilityError cause,	
						in TpMobilityDiagnostic diagnostic	
						);
						
					
					void periodicLocationReport (
						in TpSessionID assignmentId,	
						in TpUserLocationExtendedSet locations	
						);
						
					
					void periodicLocationReportErr (
						in TpSessionID assignmentId,	
						in TpMobilityError cause,	
						in TpMobilityDiagnostic diagnostic	
						);
						
				};
				
				
				
				interface IpUserLocation : IpService {
					
					TpSessionID locationReportReq (
						in IpAppUserLocation appLocation,	
						in TpAddressSet users	
						)						
						raises (TpCommonExceptions, P_APPLICATION_NOT_ACTIVATED, P_INFORMATION_NOT_AVAILABLE, P_UNKNOWN_SUBSCRIBER, P_INVALID_INTERFACE_TYPE);
						
					
					TpSessionID extendedLocationReportReq (
						in IpAppUserLocation appLocation,	
						in TpAddressSet users,	
						in TpLocationRequest request	
						)						
						raises (TpCommonExceptions, P_APPLICATION_NOT_ACTIVATED, P_REQUESTED_ACCURACY_CANNOT_BE_DELIVERED, P_REQUESTED_RESPONSE_TIME_CANNOT_BE_DELIVERED, P_UNKNOWN_SUBSCRIBER, P_INFORMATION_NOT_AVAILABLE, P_INVALID_INTERFACE_TYPE);
						
					
					TpSessionID periodicLocationReportingStartReq (
						in IpAppUserLocation appLocation,	
						in TpAddressSet users,	
						in TpLocationRequest request,	
						in TpDuration reportingInterval	
						)						
						raises (TpCommonExceptions, P_INVALID_REPORTING_INTERVAL, P_REQUESTED_ACCURACY_CANNOT_BE_DELIVERED, P_REQUESTED_RESPONSE_TIME_CANNOT_BE_DELIVERED, P_UNKNOWN_SUBSCRIBER, P_APPLICATION_NOT_ACTIVATED, P_INFORMATION_NOT_AVAILABLE, P_INVALID_INTERFACE_TYPE);
						
					
					void periodicLocationReportingStop (
						in TpMobilityStopAssignmentData stopRequest	
						)						
						raises (TpCommonExceptions, P_INVALID_ASSIGNMENT_ID);
						
				};
				
				
				
				interface IpAppTriggeredUserLocation : IpAppUserLocation {
					
					void triggeredLocationReport (
						in TpSessionID assignmentId,	
						in TpUserLocationExtended location,	
						in TpLocationTriggerCriteria criterion	
						);
						
					
					void triggeredLocationReportErr (
						in TpSessionID assignmentId,	
						in TpMobilityError cause,	
						in TpMobilityDiagnostic diagnostic	
						);
						
				};
				
				
				
				interface IpTriggeredUserLocation : IpUserLocation {
					
					TpSessionID triggeredLocationReportingStartReq (
						in IpAppTriggeredUserLocation appLocation,	
						in TpAddressSet users,	
						in TpLocationRequest request,	
						in TpLocationTriggerSet triggers	
						)						
						raises (TpCommonExceptions, P_REQUESTED_ACCURACY_CANNOT_BE_DELIVERED, P_REQUESTED_RESPONSE_TIME_CANNOT_BE_DELIVERED, P_TRIGGER_CONDITIONS_NOT_SUBSCRIBED, P_UNKNOWN_SUBSCRIBER, P_APPLICATION_NOT_ACTIVATED, P_INFORMATION_NOT_AVAILABLE, P_INVALID_INTERFACE_TYPE);
						
					
					void triggeredLocationReportingStop (
						in TpMobilityStopAssignmentData stopRequest	
						)						
						raises (TpCommonExceptions, P_INVALID_ASSIGNMENT_ID);
						
				};
				
				
				
			};
			
			
			
			module ulc {
				
				
				
				interface IpAppUserLocationCamel : IpInterface {
					
					void locationReportRes (
						in TpSessionID assignmentId,	
						in TpUserLocationCamelSet locations	
						);
						
					
					void locationReportErr (
						in TpSessionID assignmentId,	
						in TpMobilityError cause,	
						in TpMobilityDiagnostic diagnostic	
						);
						
					
					void periodicLocationReport (
						in TpSessionID assignmentId,	
						in TpUserLocationCamelSet locations	
						);
						
					
					void periodicLocationReportErr (
						in TpSessionID assignmentId,	
						in TpMobilityError cause,	
						in TpMobilityDiagnostic diagnostic	
						);
						
					
					void triggeredLocationReport (
						in TpSessionID assignmentId,	
						in TpUserLocationCamel location,	
						in TpLocationTriggerCamel criterion	
						);
						
					
					void triggeredLocationReportErr (
						in TpSessionID assignmentId,	
						in TpMobilityError cause,	
						in TpMobilityDiagnostic diagnostic	
						);
						
				};
				
				
				
				interface IpUserLocationCamel : IpService {
					
					TpSessionID locationReportReq (
						in IpAppUserLocationCamel appLocationCamel,	
						in TpAddressSet users	
						)						
						raises (TpCommonExceptions, P_UNKNOWN_SUBSCRIBER, P_APPLICATION_NOT_ACTIVATED, P_INFORMATION_NOT_AVAILABLE, P_INVALID_INTERFACE_TYPE);
						
					
					TpSessionID periodicLocationReportingStartReq (
						in IpAppUserLocationCamel appLocationCamel,	
						in TpAddressSet users,	
						in TpDuration reportingInterval	
						)						
						raises (TpCommonExceptions, P_INVALID_REPORTING_INTERVAL, P_REQUESTED_ACCURACY_CANNOT_BE_DELIVERED, P_REQUESTED_RESPONSE_TIME_CANNOT_BE_DELIVERED, P_UNKNOWN_SUBSCRIBER, P_APPLICATION_NOT_ACTIVATED, P_INFORMATION_NOT_AVAILABLE, P_INVALID_INTERFACE_TYPE);
						
					
					void periodicLocationReportingStop (
						in TpMobilityStopAssignmentData stopRequest	
						)						
						raises (TpCommonExceptions, P_INVALID_ASSIGNMENT_ID);
						
					
					TpSessionID triggeredLocationReportingStartReq (
						in IpAppUserLocationCamel appLocationCamel,	
						in TpAddressSet users,	
						in TpLocationTriggerCamel trigger	
						)						
						raises (TpCommonExceptions, P_UNKNOWN_SUBSCRIBER, P_APPLICATION_NOT_ACTIVATED, P_INFORMATION_NOT_AVAILABLE, P_INVALID_INTERFACE_TYPE);
						
					
					void triggeredLocationReportingStop (
						in TpMobilityStopAssignmentData stopRequest	
						)						
						raises (TpCommonExceptions, P_INVALID_ASSIGNMENT_ID);
						
				};
				
				
				
			};
			
			
			
			module ule {
				
				
				
				interface IpAppUserLocationEmergency : IpInterface {
					
					void emergencyLocationReport (
						in TpSessionID assignmentId,	
						in TpUserLocationEmergency location	
						);
						
					
					void emergencyLocationReportErr (
						in TpSessionID assignmentId,	
						in TpMobilityError cause,	
						in TpMobilityDiagnostic diagnostic	
						);
						
				};
				
				
				
				interface IpUserLocationEmergency : IpService {
					
					TpSessionID emergencyLocationReportReq (
						in IpAppUserLocationEmergency appEmergencyLocation,	
						in TpUserLocationEmergencyRequest request	
						)						
						raises (TpCommonExceptions, P_UNKNOWN_SUBSCRIBER, P_INFORMATION_NOT_AVAILABLE, P_APPLICATION_NOT_ACTIVATED, P_INVALID_INTERFACE_TYPE);
						
					
					TpSessionID subscribeEmergencyLocationReports (
						in IpAppUserLocationEmergency appEmergencyLocation	
						)						
						raises (TpCommonExceptions, P_INVALID_INTERFACE_TYPE);
						
					
					void unSubscribeEmergencyLocationReports (
						in TpSessionID assignmentId	
						)						
						raises (TpCommonExceptions, P_INVALID_ASSIGNMENT_ID);
						
				};
				
				
				
			};
			
			
			
			module us {
				
				
				
				interface IpAppUserStatus : IpInterface {
					
					void statusReportRes (
						in TpSessionID assignmentId,	
						in TpUserStatusSet status	
						);
						
					
					void statusReportErr (
						in TpSessionID assignmentId,	
						in TpMobilityError cause,	
						in TpMobilityDiagnostic diagnostic	
						);
						
					
					void triggeredStatusReport (
						in TpSessionID assignmentId,	
						in TpUserStatus status	
						);
						
					
					void triggeredStatusReportErr (
						in TpSessionID assignmentId,	
						in TpMobilityError cause,	
						in TpMobilityDiagnostic diagnostic	
						);
						
				};
				
				
				
				interface IpUserStatus : IpService {
					
					TpSessionID statusReportReq (
						in IpAppUserStatus appStatus,	
						in TpAddressSet users	
						)						
						raises (TpCommonExceptions, P_UNKNOWN_SUBSCRIBER, P_INFORMATION_NOT_AVAILABLE, P_APPLICATION_NOT_ACTIVATED, P_INVALID_INTERFACE_TYPE);
						
					
					TpSessionID triggeredStatusReportingStartReq (
						in IpAppUserStatus appStatus,	
						in TpAddressSet users	
						)						
						raises (TpCommonExceptions, P_UNKNOWN_SUBSCRIBER, P_INFORMATION_NOT_AVAILABLE, P_APPLICATION_NOT_ACTIVATED, P_INVALID_INTERFACE_TYPE);
						
					
					void triggeredStatusReportingStop (
						in TpMobilityStopAssignmentData stopRequest	
						)						
						raises (TpCommonExceptions, P_INVALID_ASSIGNMENT_ID);
						
				};
				
				
				
			};
			
		};
		
	};
	
};

#endif
