/* * 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. */ namespace Tizen.Applications.CoreBackend { /// /// This class represents the type of event for backends. This class can be converted from the string type. /// /// 3 public class EventType { /// /// Pre-defined event type "PreCreated". /// /// 3 public static readonly EventType PreCreated = "PreCreated"; /// /// Pre-defined event type "Created". /// /// 3 public static readonly EventType Created = "Created"; /// /// Pre-defined event type "Terminated". /// /// 3 public static readonly EventType Terminated = "Terminated"; /// /// Pre-defined event type "AppControlReceived". /// /// 3 public static readonly EventType AppControlReceived = "AppControlReceived"; /// /// Pre-defined event type "Resumed". /// /// 3 public static readonly EventType Resumed = "Resumed"; /// /// Pre-defined event type "Paused". /// /// 3 public static readonly EventType Paused = "Paused"; /// /// Pre-defined event type "LowMemory". /// /// 3 public static readonly EventType LowMemory = "LowMemory"; /// /// Pre-defined event type "LowBattery". /// /// 3 public static readonly EventType LowBattery = "LowBattery"; /// /// Pre-defined event type "LocaleChanged". /// /// 3 public static readonly EventType LocaleChanged = "LocaleChanged"; /// /// Pre-defined event type "RegionFormatChanged". /// /// 3 public static readonly EventType RegionFormatChanged = "RegionFormatChanged"; /// /// Pre-defined event type "DeviceOrientationChanged". /// /// 3 public static readonly EventType DeviceOrientationChanged = "DeviceOrientationChanged"; /// /// Pre-defined event type "SuspendedStateChanged". /// The SuspendedStateEventArgs class is an event argument class for this EventType. /// /// 6 public static readonly EventType SuspendedStateChanged = "SuspendedStateChanged"; private string _typeName; /// /// Initializes the EventType class. /// /// The name of event type. /// 3 public EventType(string name) { _typeName = name; } /// /// Returns the name of event type. /// /// 3 public override string ToString() { return _typeName; } /// /// Returns the hash code for event type string. /// /// 3 public override int GetHashCode() { if (_typeName == null) return 0; return _typeName.GetHashCode(); } /// /// Determines whether this instance and a specified object. /// /// 3 public override bool Equals(object obj) { EventType other = obj as EventType; return other != null && other._typeName == this._typeName; } /// /// Converts a string to EventType instance. /// /// 3 public static implicit operator EventType(string value) { return new EventType(value); } } }