internal static partial class Device
{
// Battery
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_battery_get_percent", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_battery_get_percent", CallingConvention = CallingConvention.Cdecl)]
public static extern int DeviceBatteryGetPercent(out int percent);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_battery_is_charging", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_battery_is_charging", CallingConvention = CallingConvention.Cdecl)]
public static extern int DeviceBatteryIsCharging(out bool charging);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_battery_get_level_status", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_battery_get_level_status", CallingConvention = CallingConvention.Cdecl)]
public static extern int DeviceBatteryGetLevelStatus(out int status);
// Display
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_display_get_numbers", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_display_get_numbers", CallingConvention = CallingConvention.Cdecl)]
public static extern int DeviceDisplayGetNumbers(out int device_number);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_display_get_max_brightness", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_display_get_max_brightness", CallingConvention = CallingConvention.Cdecl)]
public static extern int DeviceDisplayGetMaxBrightness(int index, out int max_brightness);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_display_get_brightness", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_display_get_brightness", CallingConvention = CallingConvention.Cdecl)]
public static extern int DeviceDisplayGetBrightness(int index, out int status);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_display_set_brightness", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_display_set_brightness", CallingConvention = CallingConvention.Cdecl)]
public static extern int DeviceDisplaySetBrightness(int index, int brightness);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_display_get_state", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_display_get_state", CallingConvention = CallingConvention.Cdecl)]
public static extern int DeviceDisplayGetState(out int state);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_display_change_state", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_display_change_state", CallingConvention = CallingConvention.Cdecl)]
public static extern int DeviceDisplayChangeState(int state);
// Haptic
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_haptic_get_count", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_haptic_get_count", CallingConvention = CallingConvention.Cdecl)]
internal static extern int DeviceHapticGetCount(out int device_number);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_haptic_open", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_haptic_open", CallingConvention = CallingConvention.Cdecl)]
internal static extern int DeviceHapticOpen(int index, out IntPtr handle);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_haptic_close", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_haptic_close", CallingConvention = CallingConvention.Cdecl)]
internal static extern int DeviceHapticClose(IntPtr handle);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_haptic_vibrate", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_haptic_vibrate", CallingConvention = CallingConvention.Cdecl)]
internal static extern int DeviceHapticVibrate(IntPtr handle, int duration, int feedback, out IntPtr effect);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_haptic_stop", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_haptic_stop", CallingConvention = CallingConvention.Cdecl)]
internal static extern int DeviceHapticStop(IntPtr handle, IntPtr effect);
// Led
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_flash_get_max_brightness", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_flash_get_max_brightness", CallingConvention = CallingConvention.Cdecl)]
internal static extern int DeviceFlashGetMaxBrightness(out int max_brightness);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_flash_get_brightness", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_flash_get_brightness", CallingConvention = CallingConvention.Cdecl)]
internal static extern int DeviceFlashGetBrightness(out int brightness);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_flash_set_brightness", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_flash_set_brightness", CallingConvention = CallingConvention.Cdecl)]
internal static extern int DeviceFlashSetBrightness(int brightness);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_led_play_custom", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_led_play_custom", CallingConvention = CallingConvention.Cdecl)]
internal static extern int DeviceLedPlayCustom(int on, int off, uint color, uint flags);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_led_stop_custom", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_led_stop_custom", CallingConvention = CallingConvention.Cdecl)]
internal static extern int DeviceLedStopCustom();
// Power
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_power_request_lock", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_power_request_lock", CallingConvention = CallingConvention.Cdecl)]
internal static extern int DevicePowerRequestLock(int type, int timeout_ms);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_power_release_lock", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_power_release_lock", CallingConvention = CallingConvention.Cdecl)]
internal static extern int DevicePowerReleaseLock(int type);
//IR
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_ir_is_available", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_ir_is_available", CallingConvention = CallingConvention.Cdecl)]
internal static extern int DeviceIRIsAvailable(out bool available);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_ir_transmit", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_ir_transmit", CallingConvention = CallingConvention.Cdecl)]
internal static extern int DeviceIRTransmit(int carrierFreequency, int[] pattern, int size);
// Callback
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate bool deviceCallback(int type, IntPtr value, IntPtr data);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_add_callback", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_add_callback", CallingConvention = CallingConvention.Cdecl)]
internal static extern int DeviceAddCallback(Tizen.System.EventType type, deviceCallback cb, IntPtr data);
- [DllImport("libcapi-system-device.so.0", EntryPoint = "device_remove_callback", CallingConvention = CallingConvention.Cdecl)]
+ [DllImport(Libraries.Device, EntryPoint = "device_remove_callback", CallingConvention = CallingConvention.Cdecl)]
internal static extern int DeviceRemoveCallback(Tizen.System.EventType type, deviceCallback cb);
}
}
{
internal static partial class Libraries
{
- internal const string RuntimeInfo = "libcapi-system-runtime-info.so.0";
- internal const string SystemInfo = "libcapi-system-info.so.0";
+ internal const string Device = "libcapi-system-device.so.0";
}
}
+++ /dev/null
-/*
-* Copyright (c) 2016 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.Runtime.InteropServices;
-using Tizen.System;
-
-internal static partial class Interop
-{
- internal static partial class RuntimeInfo
- {
- public delegate void RuntimeInformationChangedCallback(RuntimeInformationKey key, IntPtr userData);
-
- [StructLayout(LayoutKind.Sequential)]
- public struct MemoryInfo
- {
- public readonly int Total;
- public readonly int Used;
- public readonly int Free;
- public readonly int Cache;
- public readonly int Swap;
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct ProcessMemoryInfo
- {
- public readonly int Vsz;
- public readonly int Rss;
- public readonly int Pss;
- public readonly int SharedClean;
- public readonly int SharedDirty;
- public readonly int PrivateClean;
- public readonly int PrivateDirty;
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct CpuUsage
- {
- public readonly double User;
- public readonly double System;
- public readonly double Nice;
- public readonly double IoWait;
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct ProcessCpuUsage
- {
- public readonly uint UTime;
- public readonly uint STime;
- }
-
- [DllImport(Libraries.RuntimeInfo, EntryPoint = "runtime_info_get_value_int")]
- public static extern int GetValue(RuntimeInformationKey key, out int status);
-
- [DllImport(Libraries.RuntimeInfo, EntryPoint = "runtime_info_get_value_bool")]
- public static extern int GetValue(RuntimeInformationKey key, out bool status);
-
- [DllImport(Libraries.RuntimeInfo, EntryPoint = "runtime_info_get_value_double")]
- public static extern int GetValue(RuntimeInformationKey key, out double status);
-
- [DllImport(Libraries.RuntimeInfo, EntryPoint = "runtime_info_get_value_string")]
- public static extern int GetValue(RuntimeInformationKey key, out string status);
-
- [DllImport(Libraries.RuntimeInfo, EntryPoint = "runtime_info_get_system_memory_info")]
- public static extern int GetSystemMemoryInfo(out MemoryInfo memoryInfo);
-
- [DllImport(Libraries.RuntimeInfo, EntryPoint = "runtime_info_get_process_memory_info")]
- public static extern int GetProcessMemoryInfo(int[] pid, int size, out ProcessMemoryInfo[] array);
-
- [DllImport(Libraries.RuntimeInfo, EntryPoint = "runtime_info_get_cpu_usage")]
- public static extern int GetCpuUsage(out CpuUsage cpuUsage);
-
- [DllImport(Libraries.RuntimeInfo, EntryPoint = "runtime_info_get_process_cpu_usage")]
- public static extern int GetProcessCpuUsage(int[] pid, int size, out ProcessCpuUsage[] array);
-
- [DllImport(Libraries.RuntimeInfo, EntryPoint = "runtime_info_get_processor_count")]
- public static extern int GetProcessorCount(out int processorCount);
-
- [DllImport(Libraries.RuntimeInfo, EntryPoint = "runtime_info_get_processor_current_frequency")]
- public static extern int GetProcessorCurrentFrequency(int coreId, out int cpuFreq);
-
- [DllImport(Libraries.RuntimeInfo, EntryPoint = "runtime_info_get_processor_max_frequency")]
- public static extern int GetProcessorMaxFrequency(int coreId, out int cpuFreq);
-
- [DllImport(Libraries.RuntimeInfo, EntryPoint = "runtime_info_set_changed_cb")]
- public static extern int SetRuntimeInfoChangedCallback(RuntimeInformationKey runtimeInfoKey, RuntimeInformationChangedCallback cb, IntPtr userData);
-
- [DllImport(Libraries.RuntimeInfo, EntryPoint = "runtime_info_unset_changed_cb")]
- public static extern int UnsetRuntimeInfoChangedCallback(RuntimeInformationKey runtimeInfoKey);
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2016 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.Runtime.InteropServices;
-
-internal static partial class Interop
-{
- internal static partial class SystemInfo
- {
- internal enum ErrorCode
- {
- None = Tizen.Internals.Errors.ErrorCode.None,
- InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter,
- OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory,
- IoError = Tizen.Internals.Errors.ErrorCode.IoError,
- PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied,
- NotSupported = Tizen.Internals.Errors.ErrorCode.NoSuchDevice,
- }
-
- internal enum SystemInfoValueType
- {
- Bool = 0,
- Int = 1,
- Double = 2,
- String = 3,
- }
-
- internal enum SystemInfoType
- {
- platform,
- Custom,
- None,
- }
-
- [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_platform_type")]
- internal static extern ErrorCode SystemInfoGetPlatformType(string key, out SystemInfoValueType type);
-
- [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_custom_type")]
- internal static extern ErrorCode SystemInfoGetCustomType(string key, out SystemInfoValueType type);
-
- [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_platform_bool")]
- internal static extern ErrorCode SystemInfoGetPlatformBool(string key, out bool value);
-
- [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_platform_int")]
- internal static extern ErrorCode SystemInfoGetPlatformInt(string key, out int value);
-
- [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_platform_double")]
- internal static extern ErrorCode SystemInfoGetPlatformDouble(string key, out double value);
-
- [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_platform_string")]
- internal static extern ErrorCode SystemInfoGetPlatformString(string key, out string value);
-
- [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_custom_bool")]
- internal static extern ErrorCode SystemInfoGetCustomBool(string key, out bool value);
-
- [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_custom_int")]
- internal static extern ErrorCode SystemInfoGetCustomInt(string key, out int value);
-
- [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_custom_double")]
- internal static extern ErrorCode SystemInfoGetCustomDouble(string key, out double value);
-
- [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_custom_string")]
- internal static extern ErrorCode SystemInfoGetCustomString(string key, out string value);
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2016 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;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tizen.System
-{
- /// <summary>
- /// Structure for cpu usage.
- /// </summary>
- public class CpuUsage
- {
- internal CpuUsage(Interop.RuntimeInfo.CpuUsage usage)
- {
- IoWait = usage.IoWait;
- Nice = usage.IoWait;
- System = usage.System;
- User = usage.User;
- }
- /// <summary>
- /// Time running un-niced user processes (Percent)
- /// </summary>
- public double User { get; internal set; }
- /// <summary>
- /// Time running kernel processes (Percent)
- /// </summary>
- public double System { get; internal set; }
- /// <summary>
- /// Time running niced user processes (Percent)
- /// </summary>
- public double Nice { get; internal set; }
- /// <summary>
- /// Time waiting for I/O completion (Percent)
- /// </summary>
- public double IoWait { get; internal set; }
- }
-
- /// <summary>
- /// Structure for cpu usage per processes
- /// </summary>
- public class ProcessCpuUsage
- {
- internal ProcessCpuUsage(Interop.RuntimeInfo.ProcessCpuUsage usage)
- {
- UTime = usage.UTime;
- STime = usage.STime;
- }
- /// <summary>
- /// Amount of time that this process has been scheduled in user mode (clock ticks)
- /// </summary>
- public uint UTime { get; internal set; }
- /// <summary>
- /// Amount of time that this process has been scheduled in kernel mode (clock ticks)
- /// </summary>
- public uint STime { get; internal set; }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2016 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;
-
-namespace Tizen.System
-{
- /// <summary>
- /// Enumeration for keys for runtime information
- /// </summary>
- public enum RuntimeInformationKey
- {
- /// <summary>
- /// Indicates whether Bluetooth is enabled.
- /// </summary>
- Bluetooth = 2,
- /// <summary>
- /// Indicates whether Wi-Fi hotspot is enabled.
- /// <see cref="WifiStatus"/>
- /// </summary>
- WifiHotspot = 3,
- /// <summary>
- /// Indicates whether Bluetooth tethering is enabled.
- /// </summary>
- BluetoothTethering = 4,
- /// <summary>
- /// Indicates whether USB tethering is enabled.
- /// </summary>
- UsbTethering = 5,
- /// <summary>
- /// Indicates whether the location service is allowed to use location data from GPS satellites.
- /// </summary>
- LocationService = 6,
- /// <summary>
- /// Indicates whether the location service is allowed to use location data from cellular and Wi-Fi.
- /// </summary>
- LocationNetworkPosition = 8,
- /// <summary>
- /// Indicates Whether the packet data through 3G network is enabled.
- /// </summary>
- PacketData = 9,
- /// <summary>
- /// Indicates whether data roaming is enabled.
- /// </summary>
- DataRoaming = 10,
- /// <summary>
- /// Indicates whether vibration is enabled.
- /// </summary>
- Vibration = 12,
- /// <summary>
- /// Indicates whether audio jack is connected.
- /// </summary>
- AudioJack = 17,
- /// <summary>
- /// Indicates the current status of GPS.
- /// <see cref="GpsStatus"/>
- /// </summary>
- Gps = 18,
- /// <summary>
- /// Indicates the battery is currently charging.
- /// </summary>
- BatteryIsCharging = 19,
- /// <summary>
- /// Indicates whether TV out is connected.
- /// </summary>
- TvOut = 20,
- /// <summary>
- /// Indicates the change in audio jack connector type.
- /// <see cref="AudioJackConnectionType"/>
- /// </summary>
- AudioJackConnector = 21,
- /// <summary>
- /// Indicates whether charger is connected.
- /// </summary>
- Charger = 24,
- /// <summary>
- /// Indicates whether auto rotation is enabled.
- /// </summary>
- AutoRotation = 26
- }
-
- /// <summary>
- /// Enumeration for Wi-Fi status
- /// </summary>
- public enum WifiStatus
- {
- /// <summary>
- /// Wi-Fi is disabled.
- /// </summary>
- Disabled,
- /// <summary>
- /// Wi-Fi is enabled and network connection is not established.
- /// </summary>
- Unconnected,
- /// <summary>
- /// Network connection is established in Wi-Fi network.
- /// </summary>
- Connected
- }
-
- /// <summary>
- /// Enumeration for GPS status.
- /// </summary>
- public enum GpsStatus
- {
- /// <summary>
- /// GPS is disabled.
- /// </summary>
- Disabled,
- /// <summary>
- /// GPS is searching for satellites.
- /// </summary>
- Searching,
- /// <summary>
- /// GPS connection is established.
- /// </summary>
- Connected
- }
-
- /// <summary>
- /// Enumeration for type of audio jack connected.
- /// </summary>
- public enum AudioJackConnectionType
- {
- /// <summary>
- /// Audio jack is not connected
- /// </summary>
- Unconnected,
- /// <summary>
- /// 3-conductor wire is connected.
- /// </summary>
- ThreeWireConnected,
- /// <summary>
- /// 4-conductor wire is connected.
- /// </summary>
- FourWireConnected
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2016 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;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tizen.System
-{
- /// <summary>
- /// Memory information.
- /// </summary>
- public class SystemMemoryInformation
- {
- internal SystemMemoryInformation(Interop.RuntimeInfo.MemoryInfo info)
- {
- Total = info.Total;
- Used = info.Used;
- Cache = info.Cache;
- Free = info.Free;
- Swap = info.Swap;
- }
- /// <summary>
- /// Total memory (KiB)
- /// </summary>
- public int Total { get; internal set; }
- /// <summary>
- /// Used memory (KiB)
- /// </summary>
- public int Used { get; internal set; }
- /// <summary>
- /// Free memory (KiB)
- /// </summary>
- public int Free { get; internal set; }
- /// <summary>
- /// Cache memory (KiB)
- /// </summary>
- public int Cache { get; internal set; }
- /// <summary>
- /// Swap memory (KiB)
- /// </summary>
- public int Swap { get; internal set; }
- }
-
- /// <summary>
- /// Memory information per processes
- /// </summary>
- public class ProcessMemoryInformation
- {
- internal ProcessMemoryInformation(Interop.RuntimeInfo.ProcessMemoryInfo info)
- {
- PrivateClean = info.PrivateClean;
- PrivateDirty = info.PrivateDirty;
- Pss = info.Pss;
- Rss = info.Rss;
- SharedClean = info.SharedClean;
- SharedDirty = info.SharedDirty;
- Vsz = info.Vsz;
- }
- /// <summary>
- /// Virtual memory size (KiB)
- /// </summary>
- public int Vsz { get; internal set; }
- /// <summary>
- /// Resident set size (KiB)
- /// </summary>
- public int Rss { get; internal set; }
- /// <summary>
- /// Proportional set size (KiB)
- /// </summary>
- public int Pss { get; internal set; }
- /// <summary>
- /// Not modified and mapped by other processes (KiB)
- /// </summary>
- public int SharedClean { get; internal set; }
- /// <summary>
- /// Modified and mapped by other processes (KiB)
- /// </summary>
- public int SharedDirty { get; internal set; }
- /// <summary>
- /// Not modified and available only to that process (KiB)
- /// </summary>
- public int PrivateClean { get; internal set; }
- /// <summary>
- /// Modified and available only to that process (KiB)
- /// </summary>
- public int PrivateDirty { get; internal set; }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2016 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 Tizen.Internals.Errors;
-
-namespace Tizen.System
-{
- internal enum RuntimeInfoError
- {
- None = ErrorCode.None,
- InvalidParameter = ErrorCode.InvalidParameter,
- OutOfMemory = ErrorCode.OutOfMemory,
- Io = ErrorCode.IoError,
- RemoteIo = ErrorCode.RemoteIo,
- InvalidOperation = ErrorCode.InvalidOperation,
- PermissionDenied = ErrorCode.PermissionDenied,
- NotSupported = ErrorCode.NotSupported
- }
-
- internal static class RuntimeInfoErrorFactory
- {
- internal const string LogTag = "Tizen.System.RuntimeInformation";
-
- internal static void ThrowException(int err)
- {
- RuntimeInfoError error = (RuntimeInfoError)err;
- if (error == RuntimeInfoError.OutOfMemory)
- {
- throw new InvalidOperationException("Out of memory");
- }
- else if (error == RuntimeInfoError.InvalidParameter)
- {
- throw new ArgumentException("Invalid parameter");
- }
- else if (error == RuntimeInfoError.Io)
- {
- throw new ArgumentException("I/O Error");
- }
- else if (error == RuntimeInfoError.RemoteIo)
- {
- throw new ArgumentException("Remote I/O Error");
- }
- else if (error == RuntimeInfoError.InvalidOperation)
- {
- throw new ArgumentException("Invalid operation");
- }
- else if (error == RuntimeInfoError.PermissionDenied)
- {
- throw new ArgumentException("Permission denied");
- }
- else if (error == RuntimeInfoError.NotSupported)
- {
- throw new ArgumentException("Not supported");
- }
- }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2016 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;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tizen.System
-{
- /// <summary>
- /// The RuntimeInformation provides functions to obtain runtime information of various system preferences.
- /// </summary>
- public static class RuntimeInformation
- {
- private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_bluetoothEnabled;
- private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_wifiHotspotEnabled;
- private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_bluetoothTetheringEnabled;
- private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_usbTetheringEnabled;
- private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_locationServiceEnabled;
- private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_locationNetworkPositionEnabled;
- private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_packetDataEnabled;
- private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_dataRoamingEnabled;
- private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_vibrationEnabled;
- private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_audioJackConnected;
- private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_gpsStatusChanged;
- private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_batteryIsCharging;
- private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_tvOutConnected;
- private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_audioJackConnectorChanged;
- private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_chargerConnected;
- private static event EventHandler<RuntimeKeyStatusChangedEventArgs> s_autoRotationEnabled;
-
- private static readonly Interop.RuntimeInfo.RuntimeInformationChangedCallback s_runtimeInfoChangedCallback = (RuntimeInformationKey key, IntPtr userData) =>
- {
- RuntimeKeyStatusChangedEventArgs eventArgs = new RuntimeKeyStatusChangedEventArgs()
- {
- Key = key
- };
- switch (key)
- {
- case RuntimeInformationKey.Bluetooth:
- {
- s_bluetoothEnabled?.Invoke(null, eventArgs);
- break;
- };
- case RuntimeInformationKey.WifiHotspot:
- {
- s_wifiHotspotEnabled?.Invoke(null, eventArgs);
- break;
- };
- case RuntimeInformationKey.BluetoothTethering:
- {
- s_bluetoothTetheringEnabled?.Invoke(null, eventArgs);
- break;
- };
- case RuntimeInformationKey.UsbTethering:
- {
- s_usbTetheringEnabled?.Invoke(null, eventArgs);
- break;
- };
- case RuntimeInformationKey.LocationService:
- {
- s_locationServiceEnabled?.Invoke(null, eventArgs);
- break;
- };
- case RuntimeInformationKey.LocationNetworkPosition:
- {
- s_locationNetworkPositionEnabled?.Invoke(null, eventArgs);
- break;
- };
- case RuntimeInformationKey.PacketData:
- {
- s_packetDataEnabled?.Invoke(null, eventArgs);
- break;
- };
- case RuntimeInformationKey.DataRoaming:
- {
- s_dataRoamingEnabled?.Invoke(null, eventArgs);
- break;
- };
- case RuntimeInformationKey.Vibration:
- {
- s_vibrationEnabled?.Invoke(null, eventArgs);
- break;
- };
- case RuntimeInformationKey.AudioJack:
- {
- s_audioJackConnected?.Invoke(null, eventArgs);
- break;
- };
- case RuntimeInformationKey.Gps:
- {
- s_gpsStatusChanged?.Invoke(null, eventArgs);
- break;
- };
- case RuntimeInformationKey.BatteryIsCharging:
- {
- s_batteryIsCharging?.Invoke(null, eventArgs);
- break;
- };
- case RuntimeInformationKey.TvOut:
- {
- s_tvOutConnected?.Invoke(null, eventArgs);
- break;
- };
- case RuntimeInformationKey.AudioJackConnector:
- {
- s_audioJackConnectorChanged?.Invoke(null, eventArgs);
- break;
- };
- case RuntimeInformationKey.Charger:
- {
- s_chargerConnected?.Invoke(null, eventArgs);
- break;
- };
- case RuntimeInformationKey.AutoRotation:
- {
- s_autoRotationEnabled?.Invoke(null, eventArgs);
- break;
- };
- default:
- break;
- };
- };
-
- internal static readonly Dictionary<RuntimeInformationKey, Type> s_keyDataTypeMapping = new Dictionary<RuntimeInformationKey, Type>
- {
- [RuntimeInformationKey.Bluetooth] = typeof(bool),
- [RuntimeInformationKey.WifiHotspot] = typeof(bool),
- [RuntimeInformationKey.BluetoothTethering] = typeof(bool),
- [RuntimeInformationKey.UsbTethering] = typeof(bool),
- [RuntimeInformationKey.LocationService] = typeof(bool),
- [RuntimeInformationKey.LocationNetworkPosition] = typeof(bool),
- [RuntimeInformationKey.PacketData] = typeof(bool),
- [RuntimeInformationKey.DataRoaming] = typeof(bool),
- [RuntimeInformationKey.Vibration] = typeof(bool),
- [RuntimeInformationKey.AudioJack] = typeof(bool),
- [RuntimeInformationKey.BatteryIsCharging] = typeof(bool),
- [RuntimeInformationKey.TvOut] = typeof(bool),
- [RuntimeInformationKey.Charger] = typeof(bool),
- [RuntimeInformationKey.AutoRotation] = typeof(bool),
- [RuntimeInformationKey.Gps] = typeof(int),
- [RuntimeInformationKey.AudioJackConnector] = typeof(int)
- };
-
- /// <summary>
- /// This function gets current state of the given key which represents specific runtime information
- /// </summary>
- /// <param name="key">The runtime information key for which the current should be read </param>
- /// <returns>The current status of the given key</returns>
- internal static object GetStatus(RuntimeInformationKey key)
- {
- Type value;
- if (!s_keyDataTypeMapping.TryGetValue(key, out value))
- {
- RuntimeInfoErrorFactory.ThrowException((int)RuntimeInfoError.InvalidParameter);
- }
- if (s_keyDataTypeMapping[key] == typeof(int))
- {
- int status;
- int ret = Interop.RuntimeInfo.GetValue(key, out status);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to get value for key {0}", key.ToString());
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
-
- return status;
- }
- else
- {
- bool status;
- int ret = Interop.RuntimeInfo.GetValue(key, out status);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to get value for key {0}", key.ToString());
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
-
- return status;
- }
- }
-
- /// <summary>
- /// Validates the data type of the status represented by Runtime Key.
- /// Note that this is a generic method.
- /// </summary>
- /// <typeparam name="T">The generic type to validate.</typeparam>
- /// <param name="key">The runtime information key for which the status type is validated </param>
- /// <returns>true if the data type matches</returns>.
- public static bool Is<T>(RuntimeInformationKey key)
- {
- if (!s_keyDataTypeMapping.ContainsKey(key))
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Invalid data type");
- throw new ArgumentException("Invalid parameter");
- }
-
- return s_keyDataTypeMapping[key] == typeof(T);
- }
-
- /// <summary>
- /// Gets the status of Runtime Key.
- /// Note that this is a generic method.
- /// </summary>
- /// <typeparam name="T">The generic type to return.</typeparam>
- /// <param name="key">The runtime information key for which the current should be read </param>
- /// <returns>The current status of the given key</returns>.
- public static T GetStatus<T>(RuntimeInformationKey key)
- {
- return (T)GetStatus(key);
- }
-
- /// <summary>
- /// The System memory information
- /// </summary>
- public static SystemMemoryInformation GetSystemMemoryInformation()
- {
- Interop.RuntimeInfo.MemoryInfo info = new Interop.RuntimeInfo.MemoryInfo();
- int ret = Interop.RuntimeInfo.GetSystemMemoryInfo(out info);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to get System memory information");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
-
- return new SystemMemoryInformation(info);
- }
-
- /// <summary>
- /// Gets memory information per processes
- /// </summary>
- /// <param name="pid">List of unique process ids </param>
- /// <returns>List of memory information per processes</returns>
- public static IDictionary<int, ProcessMemoryInformation> GetProcessMemoryInformation(IEnumerable<int> pid)
- {
- int[] processArray = pid.ToArray<int>();
- Interop.RuntimeInfo.ProcessMemoryInfo[] processMemoryArray = new Interop.RuntimeInfo.ProcessMemoryInfo[pid.Count<int>()];
- Dictionary<int, ProcessMemoryInformation> map = new Dictionary<int, ProcessMemoryInformation>();
- int ret = Interop.RuntimeInfo.GetProcessMemoryInfo(processArray, pid.Count<int>(), out processMemoryArray);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to get Process memory information");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
-
- int idx = 0;
- foreach (Interop.RuntimeInfo.ProcessMemoryInfo cur in processMemoryArray)
- {
- ProcessMemoryInformation processMemory = new ProcessMemoryInformation(cur);
- map.Add(processArray[idx], processMemory);
- idx++;
- }
-
- return map;
- }
-
- /// <summary>
- /// The CPU runtime
- /// </summary>
- public static CpuUsage GetCpuUsage()
- {
- Interop.RuntimeInfo.CpuUsage usage = new Interop.RuntimeInfo.CpuUsage();
- int ret = Interop.RuntimeInfo.GetCpuUsage(out usage);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to get cpu usage");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- return new CpuUsage(usage);
- }
-
- /// <summary>
- /// The CPU run time per process
- /// </summary>
- /// <param name="pid">List of unique process ids </param>
- /// <returns>List of CPU usage information per processes</returns>
- public static IDictionary<int, ProcessCpuUsage> GetProcessCpuUsage(IEnumerable<int> pid)
- {
- int[] processArray = pid.ToArray<int>();
- Interop.RuntimeInfo.ProcessCpuUsage[] processCpuUsageArray = new Interop.RuntimeInfo.ProcessCpuUsage[pid.Count<int>()];
- Dictionary<int, ProcessCpuUsage> map = new Dictionary<int, ProcessCpuUsage>();
- int ret = Interop.RuntimeInfo.GetProcessCpuUsage(processArray, pid.Count<int>(), out processCpuUsageArray);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to get Process cpu usage");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
-
- int idx = 0;
- foreach (Interop.RuntimeInfo.ProcessCpuUsage cur in processCpuUsageArray)
- {
- ProcessCpuUsage processUsage = new ProcessCpuUsage(cur);
- map.Add(processArray[idx], processUsage);
- idx++;
- }
-
- return map;
- }
-
- /// <summary>
- /// The number of processors
- /// </summary>
- public static int ProcessorCount
- {
- get
- {
- int count;
- int ret = Interop.RuntimeInfo.GetProcessorCount(out count);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to get Processor count");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
-
- return count;
- }
- }
-
- /// <summary>
- /// Gets the current frequency of processor
- /// </summary>
- /// <param name="coreId">The index (from 0) of CPU core that you want to know the frequency</param>
- /// <returns>The current frequency(MHz) of processor</returns>
- public static int GetProcessorCurrentFrequency(int coreId)
- {
- int frequency;
- int ret = Interop.RuntimeInfo.GetProcessorCurrentFrequency(coreId, out frequency);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to get Processor current frequency");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- return frequency;
- }
-
- /// <summary>
- /// Gets the max frequency of processor
- /// </summary>
- /// <param name="coreId">The index (from 0) of CPU core that you want to know the frequency</param>
- /// <returns>The max frequency(MHz) of processor</returns>
- public static int GetProcessorMaxFrequency(int coreId)
- {
- int frequency;
- int ret = Interop.RuntimeInfo.GetProcessorMaxFrequency(coreId, out frequency);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to get Processor max frequency");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- return frequency;
- }
-
- /// <summary>
- /// (event) BluetoothEnabled is raised when system preference for bluetooth is changed.
- /// </summary>
- public static event EventHandler<RuntimeKeyStatusChangedEventArgs> BluetoothEnabled
- {
- add
- {
- if (s_bluetoothEnabled == null)
- {
- int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.Bluetooth, s_runtimeInfoChangedCallback, IntPtr.Zero);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- s_bluetoothEnabled += value;
- }
- remove
- {
- s_bluetoothEnabled -= value;
- if (s_bluetoothEnabled == null)
- {
- int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.Bluetooth);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- }
- }
- /// <summary>
- /// (event) WifiHotspotEnabled is raised when system preference for Wi-Fi is changed.
- /// </summary>
- public static event EventHandler<RuntimeKeyStatusChangedEventArgs> WifiHotspotEnabled
- {
- add
- {
- if (s_wifiHotspotEnabled == null)
- {
- int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.WifiHotspot, s_runtimeInfoChangedCallback, IntPtr.Zero);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- s_wifiHotspotEnabled += value;
- }
- remove
- {
- s_wifiHotspotEnabled -= value;
- if (s_wifiHotspotEnabled == null)
- {
- int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.WifiHotspot);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- }
- }
- /// <summary>
- /// (event) BluetoothTetheringEnabled is raised when system preference for bluetooth tethering is changed.
- /// </summary>
- public static event EventHandler<RuntimeKeyStatusChangedEventArgs> BluetoothTetheringEnabled
- {
- add
- {
- if (s_bluetoothTetheringEnabled == null)
- {
- int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.BluetoothTethering, s_runtimeInfoChangedCallback, IntPtr.Zero);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- s_bluetoothTetheringEnabled += value;
- }
- remove
- {
- s_bluetoothTetheringEnabled -= value;
- if (s_bluetoothTetheringEnabled == null)
- {
- int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.BluetoothTethering);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- }
- }
- /// <summary>
- /// (event) UsbTetheringEnabled is raised when system preference for USB terhering is changed.
- /// </summary>
- public static event EventHandler<RuntimeKeyStatusChangedEventArgs> UsbTetheringEnabled
- {
- add
- {
- if (s_usbTetheringEnabled == null)
- {
- int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.UsbTethering, s_runtimeInfoChangedCallback, IntPtr.Zero);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- s_usbTetheringEnabled += value;
- }
- remove
- {
- s_usbTetheringEnabled -= value;
- if (s_usbTetheringEnabled == null)
- {
- int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.UsbTethering);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- }
- }
- /// <summary>
- /// (event) LocationServiceEnabled is raised when system preference for location service is changed.
- /// </summary>
- public static event EventHandler<RuntimeKeyStatusChangedEventArgs> LocationServiceEnabled
- {
- add
- {
- if (s_locationServiceEnabled == null)
- {
- int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.LocationService, s_runtimeInfoChangedCallback, IntPtr.Zero);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- s_locationServiceEnabled += value;
- }
- remove
- {
- s_locationServiceEnabled -= value;
- if (s_locationServiceEnabled == null)
- {
- int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.LocationService);
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- }
- /// <summary>
- /// (event) LocationNetworkPositionEnabled is raised when system preference for allowing location service to use location data from cellular and Wi-Fi is changed.
- /// </summary>
- public static event EventHandler<RuntimeKeyStatusChangedEventArgs> LocationNetworkPositionEnabled
- {
- add
- {
- if (s_locationNetworkPositionEnabled == null)
- {
- int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.LocationNetworkPosition, s_runtimeInfoChangedCallback, IntPtr.Zero);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- s_locationNetworkPositionEnabled += value;
- }
- remove
- {
- s_locationNetworkPositionEnabled -= value;
- if (s_locationNetworkPositionEnabled == null)
- {
- int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.LocationNetworkPosition);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- }
- }
- /// <summary>
- /// (event) PacketDataEnabled is raised when system preference for package data through 3G network is changed.
- /// </summary>
- public static event EventHandler<RuntimeKeyStatusChangedEventArgs> PacketDataEnabled
- {
- add
- {
- if (s_packetDataEnabled == null)
- {
- int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.PacketData, s_runtimeInfoChangedCallback, IntPtr.Zero);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- s_packetDataEnabled += value;
- }
- remove
- {
- s_packetDataEnabled -= value;
- if (s_packetDataEnabled == null)
- {
- int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.PacketData);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- }
- }
- /// <summary>
- /// (event) DataRoamingEnabled is raised when system preference for data roaming is changed.
-
- /// </summary>
- public static event EventHandler<RuntimeKeyStatusChangedEventArgs> DataRoamingEnabled
- {
- add
- {
- if (s_dataRoamingEnabled == null)
- {
- int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.DataRoaming, s_runtimeInfoChangedCallback, IntPtr.Zero);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- s_dataRoamingEnabled += value;
- }
- remove
- {
- s_dataRoamingEnabled -= value;
- if (s_dataRoamingEnabled == null)
- {
- int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.DataRoaming);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- }
- }
- /// <summary>
- /// (event) VibrationEnabled is raised when system preference for vibration is changed.
- /// </summary>
- public static event EventHandler<RuntimeKeyStatusChangedEventArgs> VibrationEnabled
- {
- add
- {
- if (s_vibrationEnabled == null)
- {
- int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.Vibration, s_runtimeInfoChangedCallback, IntPtr.Zero);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- s_vibrationEnabled += value;
- }
- remove
- {
- s_vibrationEnabled -= value;
- if (s_vibrationEnabled == null)
- {
- int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.Vibration);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- }
- }
- /// <summary>
- /// (event) AudioJackConnected is raised when audio jack is connected/disconnected.
- /// </summary>
- public static event EventHandler<RuntimeKeyStatusChangedEventArgs> AudioJackConnected
- {
- add
- {
- if (s_audioJackConnected == null)
- {
- int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.AudioJack, s_runtimeInfoChangedCallback, IntPtr.Zero);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- s_audioJackConnected += value;
- }
- remove
- {
- s_audioJackConnected -= value;
- if (s_audioJackConnected == null)
- {
- int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.AudioJack);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- }
- }
- /// <summary>
- /// (event) GpsStatusChanged is raised when status of GPS is changed.
- /// </summary>
- public static event EventHandler<RuntimeKeyStatusChangedEventArgs> GpsStatusChanged
- {
- add
- {
- if (s_gpsStatusChanged == null)
- {
- int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.Gps, s_runtimeInfoChangedCallback, IntPtr.Zero);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- s_gpsStatusChanged += value;
- }
- remove
- {
- s_gpsStatusChanged -= value;
- if (s_gpsStatusChanged == null)
- {
- int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.Gps);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- }
- }
- /// <summary>
- /// (event) BatteryIsCharging is raised battery is currently charging.
- /// </summary>
- public static event EventHandler<RuntimeKeyStatusChangedEventArgs> BatteryIsCharging
- {
- add
- {
- if (s_batteryIsCharging == null)
- {
- int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.BatteryIsCharging, s_runtimeInfoChangedCallback, IntPtr.Zero);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- s_batteryIsCharging += value;
- }
- remove
- {
- s_batteryIsCharging -= value;
- if (s_batteryIsCharging == null)
- {
- int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.BatteryIsCharging);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- }
- }
- /// <summary>
- /// (event) TvOutConnected is raised when TV out is connected/disconnected.
- /// </summary>
- public static event EventHandler<RuntimeKeyStatusChangedEventArgs> TvOutConnected
- {
- add
- {
- if (s_tvOutConnected == null)
- {
- int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.TvOut, s_runtimeInfoChangedCallback, IntPtr.Zero);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- s_tvOutConnected += value;
- }
- remove
- {
- s_tvOutConnected -= value;
- if (s_tvOutConnected == null)
- {
- int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.TvOut);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- }
- }
- /// <summary>
- /// (event) AudioJackConnectorChanged is raised when audio jack connection changes.
- /// </summary>
- public static event EventHandler<RuntimeKeyStatusChangedEventArgs> AudioJackConnectorChanged
- {
- add
- {
- if (s_audioJackConnectorChanged == null)
- {
- int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.AudioJackConnector, s_runtimeInfoChangedCallback, IntPtr.Zero);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- s_audioJackConnectorChanged += value;
- }
- remove
- {
- s_audioJackConnectorChanged -= value;
- if (s_audioJackConnectorChanged == null)
- {
- int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.AudioJackConnector);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- }
- }
- /// <summary>
- /// (event) ChargerConnected is raised when charger is connected/disconnected.
- /// </summary>
- public static event EventHandler<RuntimeKeyStatusChangedEventArgs> ChargerConnected
- {
- add
- {
- if (s_chargerConnected == null)
- {
- int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.Charger, s_runtimeInfoChangedCallback, IntPtr.Zero);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- s_chargerConnected += value;
- }
- remove
- {
- s_chargerConnected -= value;
- if (s_chargerConnected == null)
- {
- int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.Charger);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- }
- }
- /// <summary>
- /// (event) AutoRotationEnabled is raised when system preference for auto rotaion is changed.
- /// </summary>
- public static event EventHandler<RuntimeKeyStatusChangedEventArgs> AutoRotationEnabled
- {
- add
- {
- if (s_autoRotationEnabled == null)
- {
- int ret = Interop.RuntimeInfo.SetRuntimeInfoChangedCallback(RuntimeInformationKey.AutoRotation, s_runtimeInfoChangedCallback, IntPtr.Zero);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- s_autoRotationEnabled += value;
- }
- remove
- {
- s_autoRotationEnabled -= value;
- if (s_autoRotationEnabled == null)
- {
- int ret = Interop.RuntimeInfo.UnsetRuntimeInfoChangedCallback(RuntimeInformationKey.AutoRotation);
- if (ret != (int)RuntimeInfoError.None)
- {
- Log.Error(RuntimeInfoErrorFactory.LogTag, "Interop failed to add event handler");
- RuntimeInfoErrorFactory.ThrowException(ret);
- }
- }
- }
- }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2016 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;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tizen.System
-{
- /// <summary>
- /// RuntimeInfoChangedEventArgs is an extended EventArgs class. This class contains event arguments for runtime event listeners
- /// </summary>
- public class RuntimeKeyStatusChangedEventArgs : EventArgs
- {
- /// <summary>
- /// The key indicating the runtime system preference which was changed.
- /// </summary>
- public RuntimeInformationKey Key { get; internal set; }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2016 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;
-
-namespace Tizen.System
-{
- /// <summary>
- /// System Information class. This class has methods which can be used to obtain device information
- /// </summary>
- public static class SystemInfo
- {
- private const string LogTag = "Tizen.System";
-
- private static Interop.SystemInfo.SystemInfoType GetValueType(string key, out Interop.SystemInfo.SystemInfoValueType valueType)
- {
- Interop.SystemInfo.ErrorCode err = Interop.SystemInfo.SystemInfoGetPlatformType(key, out valueType);
- if (err == Interop.SystemInfo.ErrorCode.None)
- {
- return Interop.SystemInfo.SystemInfoType.platform;
- }
-
- Log.Debug(LogTag, string.Format("Key {0} not in platform system info", key));
- err = Interop.SystemInfo.SystemInfoGetCustomType(key, out valueType);
- if (err == Interop.SystemInfo.ErrorCode.None)
- {
- return Interop.SystemInfo.SystemInfoType.Custom;
- }
-
- Log.Debug(LogTag, string.Format("Key {0} not in custom system info", key));
- return Interop.SystemInfo.SystemInfoType.None;
- }
-
- /// <summary>
- /// Checks if type of value for given feature is T
- /// </summary>
- /// <typeparam name="T">Type of value for feature key</typeparam>
- /// <param name="key">The name of the feature</param>
- /// <returns>true if type of value for given feature is T, false otherwise</returns>
- public static bool Is<T>(string key)
- {
- Interop.SystemInfo.SystemInfoValueType valueType;
- Interop.SystemInfo.SystemInfoType keyType = GetValueType(key, out valueType);
- if (keyType == Interop.SystemInfo.SystemInfoType.None)
- {
- return false;
- }
-
- switch (valueType)
- {
- case Interop.SystemInfo.SystemInfoValueType.Bool:
- return typeof(T) == typeof(bool);
- case Interop.SystemInfo.SystemInfoValueType.Double:
- return typeof(T) == typeof(double);
- case Interop.SystemInfo.SystemInfoValueType.Int:
- return typeof(T) == typeof(int);
- case Interop.SystemInfo.SystemInfoValueType.String:
- return typeof(T) == typeof(string);
- }
- return false;
- }
-
- /// <summary>
- /// Checks if given key is valid feature
- /// </summary>
- /// <param name="key">The name of the feature</param>
- /// <returns>true of key is valid, false otherwise</returns>
- public static bool IsValidKey(string key)
- {
- Interop.SystemInfo.SystemInfoValueType valueType;
- return GetValueType(key, out valueType) != Interop.SystemInfo.SystemInfoType.None;
- }
-
- /// <summary>
- /// Gets the value of the feature.
- /// </summary>
- /// <typeparam name="T">Type of key value</typeparam>
- /// <param name="key">The name of the feature</param>
- /// <param name="value">The value of the given feature</param>
- /// <returns>return true on success otherwise false</returns>
- public static bool TryGetValue<T>(string key, out T value)
- {
- bool res = false;
- if (typeof(T) == typeof(bool))
- {
- bool val;
- res = TryGetValue(key, out val);
- value = (T)(object)val;
- }
- else if (typeof(T) == typeof(int))
- {
- int val;
- res = TryGetValue(key, out val);
- value = (T)(object)val;
- }
- else if (typeof(T) == typeof(double))
- {
- double val;
- res = TryGetValue(key, out val);
- value = (T)(object)val;
- }
- else if (typeof(T) == typeof(string))
- {
- string val;
- res = TryGetValue(key, out val);
- value = (T)(object)val;
- }
- else
- {
- value = default(T);
- }
- return res;
- }
-
- /// <summary>
- /// Gets the bool value of the feature.
- /// </summary>
- /// <param name="key">The name of the feature</param>
- /// <param name="value">The value of the given feature</param>
- /// <returns>return true on success otherwise false</returns>
- public static bool TryGetValue(string key, out bool value)
- {
- Interop.SystemInfo.SystemInfoValueType valueType;
- Interop.SystemInfo.SystemInfoType keyType = GetValueType(key, out valueType);
-
- Interop.SystemInfo.ErrorCode err = Interop.SystemInfo.ErrorCode.InvalidParameter;
- if (keyType == Interop.SystemInfo.SystemInfoType.platform)
- {
- err = Interop.SystemInfo.SystemInfoGetPlatformBool(key, out value);
- }
- else if (keyType == Interop.SystemInfo.SystemInfoType.Custom)
- {
- err = Interop.SystemInfo.SystemInfoGetCustomBool(key, out value);
- } else
- {
- value = false;
- }
-
- if (err != Interop.SystemInfo.ErrorCode.None)
- {
- Log.Warn(LogTag, string.Format("Failed to get value for key: {0}. err = {1}", key, err));
- return false;
- }
-
- return true;
- }
-
- /// <summary>
- /// Gets the int value of the feature.
- /// </summary>
- /// <param name="key">The name of the feature</param>
- /// <param name="value">The value of the given feature</param>
- /// <returns>return true on success otherwise false</returns>
- public static bool TryGetValue(string key, out int value)
- {
- Interop.SystemInfo.SystemInfoValueType valueType;
- Interop.SystemInfo.SystemInfoType keyType = GetValueType(key, out valueType);
-
- Interop.SystemInfo.ErrorCode err = Interop.SystemInfo.ErrorCode.InvalidParameter;
- if (keyType == Interop.SystemInfo.SystemInfoType.platform)
- {
- err = Interop.SystemInfo.SystemInfoGetPlatformInt(key, out value);
- }
- else if (keyType == Interop.SystemInfo.SystemInfoType.Custom)
- {
- err = Interop.SystemInfo.SystemInfoGetCustomInt(key, out value);
- }
- else
- {
- value = 0;
- }
-
- if (err != Interop.SystemInfo.ErrorCode.None)
- {
- Log.Warn(LogTag, string.Format("Failed to get value for key: {0}. err = {1}", key, err));
- return false;
- }
-
- return true;
- }
-
- /// <summary>
- /// Gets the double value of the feature.
- /// </summary>
- /// <param name="key">The name of the feature</param>
- /// <param name="value">The value of the given feature</param>
- /// <returns>return true on success otherwise false</returns>
- public static bool TryGetValue(string key, out double value)
- {
- Interop.SystemInfo.SystemInfoValueType valueType;
- Interop.SystemInfo.SystemInfoType keyType = GetValueType(key, out valueType);
-
- Interop.SystemInfo.ErrorCode err = Interop.SystemInfo.ErrorCode.InvalidParameter;
- if (keyType == Interop.SystemInfo.SystemInfoType.platform)
- {
- err = Interop.SystemInfo.SystemInfoGetPlatformDouble(key, out value);
- }
- else if (keyType == Interop.SystemInfo.SystemInfoType.Custom)
- {
- err = Interop.SystemInfo.SystemInfoGetCustomDouble(key, out value);
- }
- else
- {
- value = 0;
- }
-
- if (err != Interop.SystemInfo.ErrorCode.None)
- {
- Log.Warn(LogTag, string.Format("Failed to get value for key: {0}. err = {1}", key, err));
- return false;
- }
-
- return true;
- }
-
- /// <summary>
- /// Gets the string value of the feature.
- /// </summary>
- /// <param name="key">The name of the feature</param>
- /// <param name="value">The value of the given feature</param>
- /// <returns>return true on success otherwise false</returns>
- public static bool TryGetValue(string key, out string value)
- {
- Interop.SystemInfo.SystemInfoValueType valueType;
- Interop.SystemInfo.SystemInfoType keyType = GetValueType(key, out valueType);
-
- Interop.SystemInfo.ErrorCode err = Interop.SystemInfo.ErrorCode.InvalidParameter;
- if (keyType == Interop.SystemInfo.SystemInfoType.platform)
- {
- err = Interop.SystemInfo.SystemInfoGetPlatformString(key, out value);
- }
- else if (keyType == Interop.SystemInfo.SystemInfoType.Custom)
- {
- err = Interop.SystemInfo.SystemInfoGetCustomString(key, out value);
- }
- else
- {
- value = string.Empty;
- }
-
- if (err != Interop.SystemInfo.ErrorCode.None)
- {
- Log.Warn(LogTag, string.Format("Failed to get value for key: {0}. err = {1}", key, err));
- return false;
- }
-
- return true;
- }
- }
-}
<Compile Include="Device\IR.cs" />\r
<Compile Include="Device\DeviceEventArgs.cs" />\r
<Compile Include="Interop\Interop.Device.cs" />\r
- <Compile Include="Interop\Interop.RuntimeInfo.cs" />\r
<Compile Include="Interop\Interop.Libraries.cs" />\r
- <Compile Include="Interop\Interop.SystemInfo.cs" />\r
<Compile Include="Properties\AssemblyInfo.cs" />\r
- <Compile Include="RuntimeInfo\CpuUsage.cs" />\r
- <Compile Include="RuntimeInfo\Enumerations.cs" />\r
- <Compile Include="RuntimeInfo\RuntimeInfoErrorFactory.cs" />\r
- <Compile Include="RuntimeInfo\RuntimeInformation.cs" />\r
- <Compile Include="RuntimeInfo\RuntimeKeyStatusChangedEventArgs.cs" />\r
- <Compile Include="RuntimeInfo\MemoryInformation.cs" />\r
- <Compile Include="SystemInfo\SystemInfo.cs" />\r
</ItemGroup>\r
<ItemGroup>\r
<None Include="Tizen.System.nuspec" />\r
<Compile Include="Device\IR.cs" />\r
<Compile Include="Device\DeviceEventArgs.cs" />\r
<Compile Include="Interop\Interop.Device.cs" />\r
- <Compile Include="Interop\Interop.RuntimeInfo.cs" />\r
<Compile Include="Interop\Interop.Libraries.cs" />\r
- <Compile Include="Interop\Interop.SystemInfo.cs" />\r
<Compile Include="Properties\AssemblyInfo.cs" />\r
- <Compile Include="RuntimeInfo\CpuUsage.cs" />\r
- <Compile Include="RuntimeInfo\Enumerations.cs" />\r
- <Compile Include="RuntimeInfo\RuntimeInfoErrorFactory.cs" />\r
- <Compile Include="RuntimeInfo\RuntimeInformation.cs" />\r
- <Compile Include="RuntimeInfo\RuntimeKeyStatusChangedEventArgs.cs" />\r
- <Compile Include="RuntimeInfo\MemoryInformation.cs" />\r
- <Compile Include="SystemInfo\SystemInfo.cs" />\r
</ItemGroup>\r
<ItemGroup>\r
<None Include="Tizen.System.nuspec" />\r
<projectUrl>https://www.tizen.org/</projectUrl>
<iconUrl>https://developer.tizen.org/sites/default/files/images/tizen-pinwheel-on-light-rgb_64_64.png</iconUrl>
<copyright>© Samsung Electronics Co., Ltd All Rights Reserved</copyright>
- <description>Provide classes for SystemInformation, RuntimeInformation, and Device API</description>
+ <description>Provide classes for Device APIs</description>
<dependencies>
<dependency id="Tizen" version="1.0.2" />
</dependencies>