From 353ee6910e6a7786bf5d6f915528ac9fc1bb03d9 Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Fri, 21 Aug 2015 11:01:32 +0900 Subject: [PATCH] [systeminfo, notification] modify doc - doc from http://168.219.209.56/gerrit/#/c/64885/ Change-Id: I861998ea9deefe861c87fbde3c3927e4a9b24a8e Signed-off-by: Annie park --- .../html/device_api/mobile/tizen/notification.html | 192 ++++++++++++++- .../html/device_api/mobile/tizen/systeminfo.html | 258 +++++++++++++++++---- 2 files changed, 399 insertions(+), 51 deletions(-) diff --git a/org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html b/org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html index 3feff76..96883ff 100644 --- a/org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html +++ b/org.tizen.web.apireference/html/device_api/mobile/tizen/notification.html @@ -32,6 +32,8 @@ For more information on the Notification features, see NotificationProgressType +
  • 1.5. LEDCustomFlags +
  • 2. Interfaces
    @@ -71,7 +75,9 @@ For more information on the Notification features, see remove (NotificationId id)
    void removeAll ()
    Notification get (NotificationId id)
    - Notification[] getAll () + Notification[] getAll ()
    + void playLEDCustomEffect (long timeOn, long timeOff, DOMString color, LEDCustomFlags[] flags)
    + void stopLEDCustomEffect () Notification @@ -175,6 +181,26 @@ The following notification progress types are supported: +
    +

    1.5. LEDCustomFlags

    +
    + Specifies custom LED flags. +The following values are supported in this release : +
    +
        enum LEDCustomFlags {"LED_CUSTOM_DUTY_ON", "LED_CUSTOM_DEFAULT"};
    +

    + Since: + 2.4 +

    +
    +
      +
    • +LED_CUSTOM_DUTY_ON, blink LED
    • +
    • +LED_CUSTOM_DEFAULT, default flag
    • +
    +
    +

    2. Interfaces

    @@ -217,6 +243,9 @@ Notification API. Notification[] getAll() raises(WebAPIException); + void playLEDCustomEffect(long timeOn, long timeOff, DOMString color, LEDCustomFlags[] flags) raises(WebAPIException); + + void stopLEDCustomEffect() raises(WebAPIException); };

    Since: @@ -264,9 +293,6 @@ The NotificationManager interface provides access to the notification object.

    Exceptions:

    • WebAPIException
      • - with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter. -

      • -
      • with error type InvalidValuesError, if any of the input parameters contain an invalid value.

      • @@ -274,6 +300,9 @@ parameters contain an invalid value. with error type SecurityError, if the application does not have the privilege to call this method.

      • + with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter. +

      • +
      • with error type UnknownError, if any other error occurs.

      @@ -337,9 +366,6 @@ parameters contain an invalid value.

      Exceptions:

      • WebAPIException
        • - with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter. -

        • -
        • with error type InvalidValuesError, if any of the input parameters contain an invalid value.

        • @@ -347,6 +373,9 @@ parameters contain an invalid value. with error type SecurityError, if the application does not have the privilege to call this method.

        • + with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter. +

        • +
        • with error type UnknownError, if any other error occurs.

        @@ -397,15 +426,15 @@ parameters contain an invalid value.

        Exceptions:

        • WebAPIException
          • - with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter. -

          • -
          • with error type NotFoundError, if NotificationId is not found in the previously posted notification.

          • with error type SecurityError, if the application does not have the privilege to call this method.

          • + with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter. +

          • +
          • with error type UnknownError, if any other error occurs.

          @@ -552,6 +581,127 @@ parameters contain an invalid value.
    +
    +playLEDCustomEffect +
    +
    +
    + Plays the custom effect of the service LED that is located to the front of a device. +
    +
    void playLEDCustomEffect(long timeOn, long timeOff, DOMString color, LEDCustomFlags[] flags);
    +             
    +

    + Since: + 2.4 +

    +
    +

    +Given parameters consist of timeOn and timeOff in miliseconds, RGBA color and LEDCustomFlags combination. +For the color first three bytes are RGB values. The last byte is opacity. For example "#FFFF0080". There is also another possibility when the last byte +is not given (in this case alpha is assumed to have value 0xff). In this case only RGB values are given. For example: "#ff0000" that is equivalent of "#ff0000ff". +

    +
    +

    + Privilege level: + public +

    +

    + Privilege: + http://tizen.org/privilege/led +

    +
    +

    Parameters:

    +
      +
    • +timeOn: + Turn on time in milliseconds +
    • +
    • +timeOff: + Turn off time in milliseconds +
    • +
    • +color: + The RGBA color value. The first three bytes are RGB values. The last byte is opacity. Exemplary string "#FFFF0080". +
    • +
    • +flags: + The combination of enum LEDCustomFlags +
    • +
    +
    +
    +

    Exceptions:

    +
    • WebAPIException
        +
      • + with error type InvalidValuesError, if any of the input parameters contain an invalid value. +

      • +
      • + with error type SecurityError, if the application does not have the privilege to call this method or if the author signature does not match that of the designated application. +

      • +
      • + with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter +

      • +
      • + with error type UnknownError, if the method cannot be completed because of an unknown error. +

      • +
      +
    +
    +
    +

    Code example:

     try {
    +     tizen.notification.playLEDCustomEffect(1000, 1000, "#FFFF0080", ["LED_CUSTOM_DUTY_ON", "LED_CUSTOM_DEFAULT"]);
    + } catch(e) {
    +     console.log("Error Exception, error name : " + e.name + ", error message : " + e.message);
    + }
    + 
    +
    +
    +
    +stopLEDCustomEffect +
    +
    +
    + Stops the custom effect of the service LED that is located to the front of a device. +
    +
    void stopLEDCustomEffect();
    +             
    +

    + Since: + 2.4 +

    +

    + Privilege level: + public +

    +

    + Privilege: + http://tizen.org/privilege/led +

    +
    +

    Exceptions:

    +
    • WebAPIException
        +
      • + with error type SecurityError, if the application does not have the privilege to call this method. +

      • +
      • + with error type UnknownError, if the method cannot be completed because of an unknown error. +

      • +
      +
    +
    +
    +

    Code example:

     try {
    +     tizen.notification.playLEDCustomEffect(1000, 1000, "#FFFF0080", ["LED_CUSTOM_DUTY_ON", "LED_CUSTOM_DEFAULT"]);
    +     setTimeout(function () {
    +         tizen.notification.stopLEDCustomEffect();
    +     }, 5000);
    + } catch(e) {
    +     console.log("Error Exception, error name : " + e.name + ", error message : " + e.message);
    + }
    + 
    +
    +
    @@ -1025,7 +1175,21 @@ By default, this attribute is set to null. -

    3. Full WebIDL

    +

    3. Related Feature

    +
    + You can check if this API is supported with tizen.systeminfo.getCapability() and decide enable/disable codes that need this API. +
    +

    +

    +If an application uses playLEDCustomEffect() or stopLEDCustomEffect(), declare the following feature requirements in the config file to guarantee the running of this application on a device which has a led: +

    +

    +
  • http://tizen.org/feature/led
  • + +

    + For more information, see Application Filtering. + +

    4. Full WebIDL

    module Notification {
     
         typedef DOMString NotificationId;
    @@ -1036,6 +1200,7 @@ By default, this attribute is set to null.
     
         enum NotificationProgressType { "PERCENTAGE",  "BYTE" };
     
    +    enum LEDCustomFlags {"LED_CUSTOM_DUTY_ON", "LED_CUSTOM_DEFAULT"};
     
         [NoInterfaceObject] interface NotificationObject {
             readonly attribute NotificationManager notification;
    @@ -1056,6 +1221,9 @@ By default, this attribute is set to null.
     
         Notification[] getAll() raises(WebAPIException);
     
    +        void playLEDCustomEffect(long timeOn, long timeOff, DOMString color, LEDCustomFlags[] flags) raises(WebAPIException);
    +
    +        void stopLEDCustomEffect() raises(WebAPIException);
         };
     
     
    diff --git a/org.tizen.web.apireference/html/device_api/mobile/tizen/systeminfo.html b/org.tizen.web.apireference/html/device_api/mobile/tizen/systeminfo.html
    index e2f197b..14fcf32 100644
    --- a/org.tizen.web.apireference/html/device_api/mobile/tizen/systeminfo.html
    +++ b/org.tizen.web.apireference/html/device_api/mobile/tizen/systeminfo.html
    @@ -17,37 +17,39 @@
     This API also provides interfaces and methods that can retrieve statuses of hardware devices, get the value of selected properties, and subscribe to asynchronous notifications of changes for selected values.
             

    -The following provides an overview of the tree data structure: +Web applications can use this API to access the following system properties:

    • BATTERY
    • +BUILD
    • +
    • +CAMERA_FLASH (Since: 2.4)
    • +
    • +CELLULAR_NETWORK
    • +
    • CPU
    • -STORAGE
    • +DEVICE_ORIENTATION
    • DISPLAY
    • -DEVICE_ORIENTATION
    • +ETHERNET_NETWORK (Since: 2.4)
    • -BUILD
    • +LOCALE (Since: 2.1)
    • -LOCALE
    • +MEMORY (Since: 2.3)
    • NETWORK
    • -WIFI_NETWORK
    • -
    • -CELLULAR_NETWORK
    • +PERIPHERAL (Since: 2.1)
    • SIM
    • -PERIPHERAL
    • -
    • -MEMORY
    • +STORAGE
    • -CAMERA_FLASH
    • +WIFI_NETWORK

    Not all above properties may be available on every Tizen device. For instance, a device may not support the telephony feature. In that case, CELLULAR_NETWORK and SIM are not available.

    To check the available SystemInfoPropertyId, tizen.systeminfo.getCapability() can be used. @@ -56,13 +58,17 @@ Not all above properties may be available on every Tizen device. For instance, a

  • BATTERY - tizen.systeminfo.getCapability("http://tizen.org/feature/battery")
  • - DISPLAY - tizen.systeminfo.getCapability("http://tizen.org/feature/screen")
  • -
  • - WIFI_NETWORK - tizen.systeminfo.getCapability("http://tizen.org/feature/network.wifi")
  • + CAMERA_FLASH - tizen.systeminfo.getCapability("http://tizen.org/feature/camera.back.flash")
  • CELLULAR_NETWORK - tizen.systeminfo.getCapability("http://tizen.org/feature/network.telephony")
  • + DISPLAY - tizen.systeminfo.getCapability("http://tizen.org/feature/screen")
  • +
  • + ETHERNET_NETWORK - tizen.systeminfo.getCapability("http://tizen.org/feature/network.ethernet")
  • +
  • SIM - tizen.systeminfo.getCapability("http://tizen.org/feature/network.telephony")
  • +
  • + WIFI_NETWORK - tizen.systeminfo.getCapability("http://tizen.org/feature/network.wifi")
  • For more information on the SystemInfo features, see System Information Guide. @@ -124,15 +130,17 @@ For more information on the SystemInfo features, see SystemInfoWifiNetwork -

  • 2.18. SystemInfoCellularNetwork +
  • 2.18. SystemInfoEthernetNetwork
  • -
  • 2.19. SystemInfoSIM +
  • 2.19. SystemInfoCellularNetwork
  • -
  • 2.20. SystemInfoPeripheral +
  • 2.20. SystemInfoSIM
  • -
  • 2.21. SystemInfoMemory +
  • 2.21. SystemInfoPeripheral
  • -
  • 2.22. SystemInfoCameraFlash +
  • 2.22. SystemInfoMemory +
  • +
  • 2.23. SystemInfoCameraFlash
  • @@ -227,6 +235,10 @@ For more information on the SystemInfo features, see SystemInfoEthernetNetwork + + + SystemInfoCellularNetwork @@ -255,19 +267,22 @@ For more information on the SystemInfo features, see The device property identifier. -
      enum SystemInfoPropertyId { "BATTERY", "CPU", "STORAGE", "DISPLAY", "DEVICE_ORIENTATION", "BUILD", "LOCALE", "NETWORK", "WIFI_NETWORK", "CELLULAR_NETWORK", "SIM", "PERIPHERAL", "MEMORY", "CAMERA_FLASH" };
    +
      enum SystemInfoPropertyId { "BATTERY", "CPU", "STORAGE", "DISPLAY", "DEVICE_ORIENTATION", "BUILD", "LOCALE", "NETWORK", "WIFI_NETWORK", "ETHERNET_NETWORK", "CELLULAR_NETWORK", "SIM", "PERIPHERAL", "MEMORY", "CAMERA_FLASH" };

    Since: 2.0

    Remark : - LOCALE and PERIPHERAL are supported since Tizen 2.1 + CAMERA_FLASH is supported since Tizen 2.4

    Remark : - MEMORY is supported since Tizen 2.3 + ETHERNET_NETWORK is supported since Tizen 2.4

    Remark : - CAMERA_FLASH is supported since Tizen 2.4 + LOCALE and PERIPHERAL are supported since Tizen 2.1 +

    +

    Remark : + MEMORY is supported since Tizen 2.3

    @@ -669,12 +684,23 @@ The ErrorCallback method can be launched with these error types: NotSupportedError - If the given property is not supported. (since Tizen 2.3)
    +

    + Privilege level: + public +

    +

    + Privilege: + http://tizen.org/privilege/telephony +

    Remark : If the given property is not supported, NotSupportedError would be passed through a ErrorCallback() since Tizen 2.3.

    Remark : If system provides more than one value for the system property, the primary(first) system property is returned through SystemInfoSuccessCallback.

    +

    Remark : + http://tizen.org/privilege/telephony has been required only for CELLULAR_NETWORK property since Tizen 2.4. +

    Parameters:

      @@ -701,6 +727,9 @@ NotSupportedError - If the given property is not supported. (since Ti
    • with error type UnknownError in any other error case.

    • +
    • + with error type SecurityError, this error is only thrown for CELLULAR_NETWORK property when an application does not declare http://tizen.org/privilege/telephony privilege in config.xml. +

    @@ -765,9 +794,20 @@ The ErrorCallback method can be launched with these error types: NotSupportedError - If the given property is not supported. +

    + Privilege level: + public +

    +

    + Privilege: + http://tizen.org/privilege/telephony +

    Remark : see getCount().

    +

    Remark : + http://tizen.org/privilege/telephony has been required only for CELLULAR_NETWORK property since Tizen 2.4. +

    Parameters:

      @@ -787,9 +827,14 @@ NotSupportedError - If the given property is not supported.

    Exceptions:

    -
    • WebAPIException
      • +

        • WebAPIException
            +
          • with error type TypeMismatchError, if the input parameter is not compatible with the expected type. -

          +

        • +
        • + with error type SecurityError, this error is only thrown for CELLULAR_NETWORK property when an application does not declare http://tizen.org/privilege/telephony privilege in config.xml. +

        • +
    @@ -858,9 +903,20 @@ NotSupportedError - If the given property is not supported. (since Ti
    +

    + Privilege level: + public +

    +

    + Privilege: + http://tizen.org/privilege/telephony +

    Remark : The errorCallback() is newly added as an optional parameter since Tizen 2.3.

    +

    Remark : + http://tizen.org/privilege/telephony has been required only for CELLULAR_NETWORK property since Tizen 2.4. +

    Parameters:

      @@ -898,6 +954,9 @@ NotSupportedError - If the given property is not supported. (since Ti
    • with error type UnknownError in any other error case.

    • +
    • + with error type SecurityError, this error is only thrown for CELLULAR_NETWORK property when an application does not declare http://tizen.org/privilege/telephony privilege in config.xml. +

    @@ -938,6 +997,17 @@ There are device properties which never change (for example "BUILD") and propert any identifier of these properties, but the listener added for them will not be invoked.

    +

    + Privilege level: + public +

    +

    + Privilege: + http://tizen.org/privilege/telephony +

    +

    Remark : + http://tizen.org/privilege/telephony has been required only for CELLULAR_NETWORK property since Tizen 2.4. +

    Parameters:

      @@ -975,6 +1045,9 @@ any identifier of these properties, but the listener added for them will not be
    • with error type UnknownError in any other error case.

    • +
    • + with error type SecurityError, this error is only thrown for CELLULAR_NETWORK property when an application does not declare http://tizen.org/privilege/telephony privilege in config.xml. +

    @@ -2686,8 +2759,90 @@ It is written in MM:MM:MM:SS:SS:SS format. +
    +

    2.18. SystemInfoEthernetNetwork

    +
    + This property reflects the information of the Ethernet network in this system. +
    +
       [NoInterfaceObject] interface SystemInfoEthernetNetwork : SystemInfoProperty {
    +    readonly attribute DOMString cable;
    +
    +    readonly attribute DOMString status;
    +
    +    readonly attribute DOMString ipAddress;
    +
    +    readonly attribute DOMString ipv6Address;
    +
    +    readonly attribute DOMString macAddress;
    +  };
    +

    + Since: + 2.4 +

    + +
    +

    Attributes

    +
      +
    • + readonly +DOMString cable
      + Represents the cable status (ATTACHED or DETACHED) of the ethernet interface. +
      +

      + Since: + 2.4 +

      +
    • +
    • + readonly +DOMString status
      + Represents the status (DEACTIVATED, DISCONNECTED or CONNECTED) of the ethernet interface. +
      +

      + Since: + 2.4 +

      +
    • +
    • + readonly +DOMString ipAddress
      + Represents the IPv4 address of the ethernet network. +
      +

      + Since: + 2.4 +

      +
    • +
    • + readonly +DOMString ipv6Address
      + Represents the IPv6 address of the ethernet network. +
      +

      + Since: + 2.4 +

      +
    • +
    • + readonly +DOMString macAddress
      + Represents the MAC address of the ethernet interface. +
      +
      +

      +It is written in MM:MM:MM:SS:SS:SS format. +

      +
      +

      + Since: + 2.4 +

      +
    • +
    +
    +
    -

    2.18. SystemInfoCellularNetwork

    +

    2.19. SystemInfoCellularNetwork

    This property reflects the information of the Cellular network in this system.
    @@ -2841,7 +2996,7 @@ identify a mobile phone operator/carrier using the GSM, CDMA, iDEN, TETRA and UM Privilege: http://tizen.org/privilege/telephony

    -

    Remark : +

    Warning: http://tizen.org/privilege/systemmanager (partner level) has been deprecated since 2.3.1. Instead, use http://tizen.org/privilege/telephony.

    @@ -2856,7 +3011,7 @@ identify a mobile phone operator/carrier using the GSM, CDMA, iDEN, TETRA and UM
    -

    2.19. SystemInfoSIM

    +

    2.20. SystemInfoSIM

    This property reflects the information of the SIM card information.
    @@ -2952,7 +3107,7 @@ identify a mobile phone operator/carrier using the GSM, CDMA, iDEN, TETRA and UM Privilege: http://tizen.org/privilege/telephony

    -

    Remark : +

    Warning: http://tizen.org/privilege/systemmanager (partner level) has been deprecated since 2.3.1. Instead, use http://tizen.org/privilege/telephony.

    @@ -3055,7 +3210,7 @@ identify a mobile phone operator/carrier using the GSM, CDMA, iDEN, TETRA and UM Privilege: http://tizen.org/privilege/telephony

    -

    Remark : +

    Warning: http://tizen.org/privilege/systemmanager (partner level) has been deprecated since 2.3.1. Instead, use http://tizen.org/privilege/telephony.

    @@ -3095,7 +3250,7 @@ identify a mobile phone operator/carrier using the GSM, CDMA, iDEN, TETRA and UM
    -

    2.20. SystemInfoPeripheral

    +

    2.21. SystemInfoPeripheral

    This property reflects the peripheral information of the current device.
    @@ -3122,7 +3277,7 @@ identify a mobile phone operator/carrier using the GSM, CDMA, iDEN, TETRA and UM
    -

    2.21. SystemInfoMemory

    +

    2.22. SystemInfoMemory

    This property represents information about the memory state on the device system.
    @@ -3150,7 +3305,7 @@ identify a mobile phone operator/carrier using the GSM, CDMA, iDEN, TETRA and UM
    -

    2.22. SystemInfoCameraFlash

    +

    2.23. SystemInfoCameraFlash

    The SystemInfoCameraFlash provides the way to control the attached the camera flash.
    @@ -3273,6 +3428,11 @@ The getPropertyValue() method retrieves the SystemInfoCameraFlash< Since: 2.4

    +
    +

    +If the specified brightness value is not supported by the device, the brightness is rounded down to the nearest supported brightness value. +

    +

    Privilege level: public @@ -3331,26 +3491,34 @@ The getPropertyValue() method retrieves the SystemInfoCameraFlash<

    -To guarantee the running of this application on a device which supports Wi-Fi, declare the following feature requirements in the config file: +To guarantee the running of the application on a device which has camera back flash and control it, declare the following feature requirements in the config file:

    -
  • http://tizen.org/feature/network.wifi
  • +
  • http://tizen.org/feature/camera.back.flash
  • -To guarantee the running of this application on a device which supports telephony feature, declare the following feature requirements in the config file: +To guarantee the running of the application on a device which supports telephony feature, declare the following feature requirements in the config file:

  • http://tizen.org/feature/network.telephony
  • +
    +

    +

    +To guarantee the running of the application on a device which supports Wi-Fi, declare the following feature requirements in the config file: +

    +

    +
  • http://tizen.org/feature/network.wifi
  • +

    - For more information, see Application Filtering. + For more information, see Application Filtering.

    4. Full WebIDL

    module SystemInfo {
     
    -  enum SystemInfoPropertyId { "BATTERY", "CPU", "STORAGE", "DISPLAY", "DEVICE_ORIENTATION", "BUILD", "LOCALE", "NETWORK", "WIFI_NETWORK", "CELLULAR_NETWORK", "SIM", "PERIPHERAL", "MEMORY", "CAMERA_FLASH" };
    +  enum SystemInfoPropertyId { "BATTERY", "CPU", "STORAGE", "DISPLAY", "DEVICE_ORIENTATION", "BUILD", "LOCALE", "NETWORK", "WIFI_NETWORK", "ETHERNET_NETWORK", "CELLULAR_NETWORK", "SIM", "PERIPHERAL", "MEMORY", "CAMERA_FLASH" };
     
       enum SystemInfoNetworkType { "NONE", "2G", "2.5G", "3G", "4G", "WIFI", "ETHERNET", "UNKNOWN" };
     
    @@ -3636,6 +3804,18 @@ To guarantee the running of this application on a device which supports telephon
         readonly attribute double signalStrength;
       };
     
    +   [NoInterfaceObject] interface SystemInfoEthernetNetwork : SystemInfoProperty {
    +    readonly attribute DOMString cable;
    +
    +    readonly attribute DOMString status;
    +
    +    readonly attribute DOMString ipAddress;
    +
    +    readonly attribute DOMString ipv6Address;
    +
    +    readonly attribute DOMString macAddress;
    +  };
    +
       [NoInterfaceObject] interface SystemInfoCellularNetwork : SystemInfoProperty {
     
         readonly attribute DOMString status;
    -- 
    2.7.4