/* * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; using System.Collections.Generic; namespace Tizen.Tapi { /// /// A class which defines network registration status. /// public class NetworkRegistrationStatus { internal NetworkServiceLevel Cs; internal NetworkServiceLevel Ps; internal NetworkServiceType SvcType; internal bool Roaming; internal NetworkRegistrationStatus() { } /// /// Circuit Switched status. /// /// Status of circuit switched data. public NetworkServiceLevel CircuitStatus { get { return Cs; } } /// /// Packet Switched status. /// /// Status of packet switched data. public NetworkServiceLevel PacketStatus { get { return Ps; } } /// /// Registration service type. /// /// Service type represented in NetworkServiceType enum. public NetworkServiceType Type { get { return SvcType; } } /// /// Roaming status /// /// Boolean value to check the roaming status. public bool IsRoaming { get { return Roaming; } } } /// /// A class which defines network cell info notification. /// public class NetworkCellNoti { internal int Location; internal int Id; internal NetworkCellNoti() { } /// /// Location Area Code (In case of LTE network, it represents Tracking Area Code). /// /// Location area code represented in integer. public int Lac { get { return Location; } } /// /// Cell ID. /// /// Cell id represented in integer. public int CellId { get { return Id; } } } /// /// A class which defines network change notification. /// public class NetworkChangeNoti { internal NetworkSystemType Type; internal string NwPlmn; internal NetworkChangeNoti() { } /// /// Access technology. /// /// Access technology represented in NetworkSystemType enum. public NetworkSystemType Act { get { return Type; } } /// /// Network PLMN. /// /// Plmn value represented as string. public string Plmn { get { return NwPlmn; } } } /// /// A class which defines network time notification. /// public class NetworkTimeNoti { internal DateTime TimeInfo; internal int WDayInfo; internal int GmtOffInfo; internal int DstOffInfo; internal bool Dst; internal string NetworkPlmn; internal NetworkTimeNoti() { } /// /// Date time information. /// /// An instance of DateTime representing date time information. public DateTime Time { get { return TimeInfo; } } /// /// Wday information. /// /// Wday info represented in integer. public int WDay { get { return WDayInfo; } } /// /// GMT Off. /// /// GMT off info represented in integer. public int GmtOff { get { return GmtOffInfo; } } /// /// DST Off. /// /// DST off info represented in integer. public int DstOff { get { return DstOffInfo; } } /// /// Flag for checking if it is DST. /// /// Boolean value to check if the time is DST or not. public bool IsDst { get { return Dst; } } /// /// Network PLMN. /// /// PLMN value represented in string. public string Plmn { get { return NetworkPlmn; } } } /// /// A class which defines network identity notification. /// public class NetworkIdentityNoti { internal string NwPlmn; internal string NwShortName; internal string NwFullName; internal NetworkIdentityNoti() { } /// /// Network PLMN. /// /// Plmn value represented in string. public string Plmn { get { return NwPlmn; } } /// /// Short network name. /// /// Short name of the network in string. public string ShortName { get { return NwShortName; } } /// /// Full network name. /// /// Full name of the network in string. public string FullName { get { return NwFullName; } } } /// /// A class which defines network VoLTE status notification. /// public class NetworkVolteStatus { internal bool NwIsRegistered; internal int NwFeatureMask; internal VolteNetworkType NwType; internal NetworkVolteStatus() { } /// /// VoLTE status. /// /// Boolean value to check if it is registered. public bool IsRegistered { get { return NwIsRegistered; } } /// /// Services registered for. /// /// Service mask represented in integer. public int FeatureMask { get { return NwFeatureMask; } } /// /// Network on which VoLTE is registered. /// /// Type of VoLTE network represented in VolteNetworkType enum. public VolteNetworkType Type { get { return NwType; } } } /// /// A class which defines network identity. /// public class NetworkIdentity { internal string IdName; internal string SvcProviderName; internal string PlmnName; internal uint Id; internal NetworkPlmnType PlmnNwType; internal NetworkSystemType SysType; internal NetworkIdentity() { } /// /// Network name. /// public string Name { get { return IdName; } } /// /// Service provider name. /// public string ServiceProviderName { get { return SvcProviderName; } } /// /// Network plmn. /// public string Plmn { get { return PlmnName; } } /// /// Plmn Id. /// public uint PlmnId { get { return Id; } } /// /// Plmn type. /// public NetworkPlmnType PlmnType { get { return PlmnNwType; } } /// /// Access technology. /// public NetworkSystemType SystemType { get { return SysType; } } } /// /// A class for the network plmn list. /// public class NetworkPlmnList { internal byte NwCount; internal IEnumerable NwList; internal NetworkPlmnList() { } /// /// Network plmn count. /// /// Count of the network plmn. public byte NetworkCount { get { return NwCount; } } /// /// Network list. /// /// List of NetworkIdentity. public IEnumerable NetworkList { get { return NwList; } } } /// /// A class which defines the preferred plmn information. /// public class NetworkPreferredPlmnInfo { internal byte idex; internal string NwPlmn; internal string NwName; internal string SvcProvName; internal NetworkSystemType SysType; /// /// Preferred plmn list index. /// ///Index of preferred plmn list. public byte Index { get { return idex; } set { idex = value; } } /// /// Preferred plmn. /// /// Plmn string. public string Plmn { get { return NwPlmn; } set { NwPlmn = value; } } /// /// Network name. /// /// Name of network. public string NetworkName { get { return NwName; } set { NwName = value; } } /// /// Service provider name. /// /// Name of service provider. public string ServiceProviderName { get { return SvcProvName; } set { SvcProvName = value; } } /// /// System type of network. /// /// System type of network. public NetworkSystemType SystemType { get { return SysType; } set { SysType = value; } } } /// /// A class containing information related to a cdma system. /// public class NetworkCdmaSysInfo { internal int Car; internal uint SysId; internal uint NwId; internal uint BaseStnId; internal int BaseStnLatitude; internal int BaseStnLongitude; internal uint RegZone; internal uint Offset; internal NetworkCdmaSysInfo() { } /// /// Cdma carrier. /// /// Cdma carrier. public int Carrier { get { return Car; } } /// /// System Id. /// /// System Id. public uint SystemId { get { return SysId; } } /// /// Network Id. /// /// Id of network. public uint NetworkId { get { return NwId; } } /// /// Base station Id. /// /// Id of base station. public uint BaseStationId { get { return BaseStnId; } } /// /// Latitude of the current base station. /// /// Latitude of the current base station. public int BaseStationLatitude { get { return BaseStnLatitude; } } /// /// Longitude of the current base station. /// /// Longitude of the current base station. public int BaseStationLongitude { get { return BaseStnLongitude; } } /// /// Registration zone. /// /// Registration zone. public uint RegistrationZone { get { return RegZone; } } /// /// Pilot offset. /// /// Offset of pilot. public uint PilotOffset { get { return Offset; } } } /// /// A class containing information about network area. /// public class NetworkAreaInfo { internal int Code; internal NetworkCdmaSysInfo Cdma; internal NetworkAreaInfo() { } /// /// Location area code. /// /// Area code of location. public int Lac { get { return Code; } } /// /// Instance of NetworkCdmaSysInfo. /// /// Instance of NetworkCdmaSysInfo. public NetworkCdmaSysInfo CdmaInfo { get { return Cdma; } } } /// /// A class containing information of serving network. /// public class NetworkServing { internal NetworkSystemType Type; internal string NwPlmn; internal NetworkAreaInfo Area; internal NetworkServing() { } /// /// Access technology. /// /// System type of network. public NetworkSystemType SystemType { get { return Type; } } /// /// Network plmn. /// /// Plmn of network. public string Plmn { get { return NwPlmn; } } /// /// Area information of network. /// /// Instance of NetworkAreaInfo. public NetworkAreaInfo AreaInfo { get { return Area; } } } /// /// A class containing information of cdma cell. /// public class NetworkCdmaCell { internal uint SysId; internal uint NwId; internal uint BaseStnId; internal uint RefPn; internal int BaseStnLatitude; internal int BaseStnLongitude; internal NetworkCdmaCell() { } /// /// System Id info. /// /// System Id. public uint SystemId { get { return SysId; } } /// /// Network Id. /// /// Network Id. public uint NetworkId { get { return NwId; } } /// /// Base station Id. /// /// Base station id. public uint BaseStationId { get { return BaseStnId; } } /// /// Reference pn. /// /// Reference pn. public uint ReferencePn { get { return RefPn; } } /// /// Latitude of the current base station. /// /// Latitude of the current base station. public int BaseStationLatitude { get { return BaseStnLatitude; } } /// /// Longitude of the current base station. /// /// Longitude of the current base station. public int BaseStationLongitude { get { return BaseStnLongitude; } } } /// /// A class containing information of lte cell. /// public class NetworkLteCell { internal int Id; internal int Lc; internal int PId; internal int Erf; internal int Tc; internal int Rs; internal NetworkLteCell() { } /// /// Value of cell Id. -1 indicates that cell Id information is not present. /// /// Cell Id. public int CellId { get { return Id; } } /// /// Location area code. This field is ignored when CellId is not present. /// /// Code of area. public int Lac { get { return Lc; } } /// /// Physical cell id info. /// /// Physical cell id. public int PhysicalId { get { return PId; } } /// /// E-Utra absolute rf channel number. /// /// E-Utra absolute rf channel number. public int Earfcn { get { return Erf; } } /// /// Tracking area code. /// /// Area code for tracking. public int Tac { get { return Tc; } } /// /// Rssi in dBm(signed) /// /// Rssi in dBm. public int Rssi { get { return Rs; } } } /// /// A class containing information of umts cell. /// public class NetworkUmtsCell { internal int Id; internal int Lc; internal int Arf; internal int Ps; internal int Rsc; internal NetworkUmtsCell() { } /// /// Ucid. -1 indicates that cell Id information is not present. /// /// RNCID + Cell ID(16 bit). public int CellId { get { return Id; } } /// /// Location area code. This field is ignored when CellId is not present. /// /// Code of area. public int Lac { get { return Lc; } } /// /// Utra absolute rf channel number. /// /// Utra absolute rf channel number. public int Arfcn { get { return Arf; } } /// /// Primary scrambling code. /// /// Primary scrambling code. public int Psc { get { return Ps; } } /// /// Received signal code power. Valid values are (0-96, 255). /// /// Power of received signal code. public int Rscp { get { return Rsc; } } } /// /// A class containing information of geran cell. /// public class NetworkGeranCell { internal int Id; internal int Lc; internal int Bc; internal int Bs; internal int Rx; internal NetworkGeranCell() { } /// /// Value of cell Id. -1 indicates that cell Id information is not present. /// /// Cell Id. public int CellId { get { return Id; } } /// /// Location area code. This field is ignored when CellId is not present. /// /// Code of area. public int Lac { get { return Lc; } } /// /// Broadcast control channel frequency number. /// /// Broadcast control channel frequency number. public int Bcch { get { return Bc; } } /// /// Base station identification code. /// /// Id code of base station. public int Bsic { get { return Bs; } } /// /// Received signal strength level. Valid values are (0-63, 99). /// /// Strength of received signal. public int Rxlev { get { return Rx; } } } /// /// A class which contains geran, umts, cdma and lte cell information. /// public class Cell { internal NetworkGeranCell Geran; internal NetworkCdmaCell Cdma; internal NetworkUmtsCell Umts; internal NetworkLteCell Lte; internal Cell() { } /// /// Geran cell information. /// /// Instance of NetworkGeranCell. public NetworkGeranCell GeranCell { get { return Geran; } } /// /// Cdma cell information. /// /// Instance of NetworkCdmaCell. public NetworkCdmaCell CdmaCell { get { return Cdma; } } /// /// Umts cell information. /// /// Instance of NetworkUmtsCell. public NetworkUmtsCell UmtsCell { get { return Umts; } } /// /// Lte cell information. /// /// Instance of NetworkLteCell. public NetworkLteCell LteCell { get { return Lte; } } } /// /// A class which contains serving cell information. /// public class NetworkServingCell { internal NetworkSystemType SysType; internal int MCountryCode; internal int MNwCode; internal Cell Info; internal NetworkServingCell() { } /// /// Access technology. /// /// Network system type. public NetworkSystemType SystemType { get { return SysType; } } /// /// Mobile country code. /// /// Country code of the mobile. public int MobileCountryCode { get { return MCountryCode; } } /// /// Mobile network code. /// /// Network code of the mobile. public int MobileNetworkCode { get { return MNwCode; } } /// /// Information of cell. /// ///Instance of Cell. public Cell CellInfo { get { return Info; } } } /// /// A class which contains neighboring cell information. /// public class NetworkNeighboringCell { internal NetworkServingCell ServCell; internal IEnumerable GrList; internal IEnumerable UmtList; internal IEnumerable LtList; internal NetworkNeighboringCell() { } /// /// Serving cell information. /// /// Instance of NetworkServingCell. public NetworkServingCell ServingCell { get { return ServCell; } } /// /// Geran cell info list. /// /// List of NetworkGeranCell. public IEnumerable GeranList { get { return GrList; } } /// /// Umts cell info list. /// /// List of NetworkUmtsCell. public IEnumerable UmtsList { get { return UmtList; } } /// /// Lte cell info list. /// /// List of NetworkLteCell. public IEnumerable LteList { get { return LtList; } } } }