Skip to content

Touch Profile

Onuzimoyr edited this page Nov 17, 2015 · 2 revisions

目次

API 機能概要
Touch API デバイスでタッチ(touchstart,touchendされた後)されたことを通知する。
Touch Start API デバイスでタッチが開始されたことを通知する。
Touch End API デバイスでタッチが終了されたことを通知する。
Double Tap API デバイスでダブルタップされていることを通知する。
Touch Move API デバイスでタッチされ続けていることを通知する。
Touch Cancel API デバイスでタッチがキャンセルされたことを通知する。

機能概要

スマートデバイス上でのタッチイベントを通知するAPI。

参考API

http://www.w3.org/TR/2013/REC-touch-events-20131010/

インターフェース名称 Version 種別
Touch API 2.0.0 非同期I/F(イベントI/F)

概要

デバイスでタッチ(touchstart,touchendされた後)されたことを通知する。

イベント情報

イベント名 Content-Type
/gotapi/touch/ontouch application/json

メッセージ

論理名 物理名 データ型 省略 設定値
オブジェクト touch object - イベントの内容を保持するオブジェクト(object)。
オブジェクト touches object[] - タッチされているオブジェクトの配列。
属性値 id number - タッチを開始すると割り振られる、ユニーク(唯一)な識別番号。
属性値 x number - デバイスが持つ空間の左上を原点としたx座標。
属性値 y number - デバイスが持つ空間の左上を原点としたy座標

メッセージサンプル

{
    "product":"Device Connect Manager",
    "version":"x.x",
    "serviceId": “device1.localhost.deviceconnect.org",
    “api”: “gotapi”,
    "profile" : “touch”,
    "attribute" : "ontouch",
    "sessionKey" : "0a93ac0aade4e046ed63eb24d1172f5f35c88ca60daa901547c28d5827cb418a5de1d7c5f9e62405",
    "touch" : {
         "touches": [
		 {
			 “id”:0,
			 “x”:4,
			 “y":5
		 },
		 {
			 “id”:1,
			 “x":54,
			 “y":55
		 },
 	]
    }
}
インターフェース名称 Version 種別
Touch Start API 2.0.0 非同期I/F(イベントI/F)

概要

デバイスでタッチが開始されたことを通知する。

イベント情報

イベント名 Content-Type
/gotapi/touch/ontouchstart application/json

メッセージ

論理名 物理名 データ型 省略 設定値
オブジェクト touch object - イベントの内容を保持するオブジェクト(object)。
オブジェクト touches object[] - タッチされているオブジェクトの配列。
属性値 id number - タッチを開始すると割り振られる、ユニーク(唯一)な識別番号。
属性値 x number - デバイスが持つ空間の左上を原点としたx座標。
属性値 y number - デバイスが持つ空間の左上を原点としたy座標

メッセージサンプル

{
    "product":"Device Connect Manager",
    "version":"x.x",
    "serviceId": “device1.localhost.deviceconnect.org",
    “api”: “gotapi”,
    "profile" : “touch”,
    "attribute" : "ontouchstart",
    "sessionKey" : "0a93ac0aade4e046ed63eb24d1172f5f35c88ca60daa901547c28d5827cb418a5de1d7c5f9e62405",
    "touch" : {
       "touches": [
            {
                “id”:0,
                “x”:4,
                “y":5
            },
           {
                “id”:1,
                “x":54,
                “y":55
            },
       ]
    }
}
インターフェース名称 Version 種別
Touch End API 2.0.0 非同期I/F(イベントI/F)

概要

デバイスでタッチが終了されたことを通知するイベント。

イベント情報

イベント名 Content-Type
/gotapi/touch/ontouchend application/json

メッセージ

論理名 物理名 データ型 省略 設定値
オブジェクト touch object - イベントの内容を保持するオブジェクト(object)。
オブジェクト touches object[] - タッチされているオブジェクトの配列。
属性値 id number - タッチを開始すると割り振られる、ユニーク(唯一)な識別番号。
属性値 x number - デバイスが持つ空間の左上を原点としたx座標。
属性値 y number - デバイスが持つ空間の左上を原点としたy座標

メッセージサンプル

{
    "product":"Device Connect Manager",
    "version":"x.x",
    "serviceId": “device1.localhost.deviceconnect.org",
    “api”: “gotapi”,
    "profile" : “touch”,
    "attribute" : "ontouchend",
    "sessionKey" : "0a93ac0aade4e046ed63eb24d1172f5f35c88ca60daa901547c28d5827cb418a5de1d7c5f9e62405",
    "touch" : {
       "touches": [
            {
                “id”:0,
                “x”:4,
                “y":5
            },
            {
               “id”:1,
               “x":54,
               “y":55
            },
       ]
    }
}
インターフェース名称 Version 種別
Double Tap API 2.0.0 非同期I/F(イベントI/F)

概要

デバイスでダブルタップされたことを通知するイベント。

イベント情報

イベント名 Content-Type
/gotapi/touch/ondoubletap application/json

メッセージ

論理名 物理名 データ型 省略 設定値
オブジェクト touch object - イベントの内容を保持するオブジェクト(object)。
オブジェクト touches object[] - タッチされているオブジェクトの配列。
属性値 id number - タッチを開始すると割り振られる、ユニーク(唯一)な識別番号。
属性値 x number - デバイスが持つ空間の左上を原点としたx座標。
属性値 y number - デバイスが持つ空間の左上を原点としたy座標

メッセージサンプル

{
    "product":"Device Connect Manager",
    "version":"x.x",
    "serviceId": “device1.localhost.deviceconnect.org",
    “api”: “gotapi”,
    "profile" : “touch”,
    "attribute" : "ondoubletap",
    "sessionKey" : "0a93ac0aade4e046ed63eb24d1172f5f35c88ca60daa901547c28d5827cb418a5de1d7c5f9e62405",
   "touch" : {
       "touches": [
           {
               “id”:0,
               “x”:4,
               “y":5
           },
           {
               “id”:1,
               “x":54,
               “y":55
           },
      ]
   }
}
インターフェース名称 Version 種別
Touch Move API 2.0.0 非同期I/F(イベントI/F)

概要

デバイスでタッチされ続けていることを通知するイベント。

イベント情報

イベント名 Content-Type
/gotapi/touch/ontouchmove application/json

メッセージ

論理名 物理名 データ型 省略 設定値
オブジェクト touch object - イベントの内容を保持するオブジェクト(object)。
オブジェクト touches object[] - タッチされているオブジェクトの配列。
属性値 id number - タッチを開始すると割り振られる、ユニーク(唯一)な識別番号。
属性値 x number - デバイスが持つ空間の左上を原点としたx座標。
属性値 y number - デバイスが持つ空間の左上を原点としたy座標

メッセージサンプル

{
    "product":"Device Connect Manager",
    "version":"x.x",
    "serviceId": “device1.localhost.deviceconnect.org",
    “api”: “gotapi”,
   "profile" : “touch”,
   "attribute" : "ontouchmove",
   "sessionKey" : "0a93ac0aade4e046ed63eb24d1172f5f35c88ca60daa901547c28d5827cb418a5de1d7c5f9e62405",
   "touch" : {
   "touches": [
           {
               “id”:0,
               “x”:4,
               “y":5
           },
           {
               “id”:1,
               “x":54,
               “y":55
           },
      ]
   }
}
インターフェース名称 Version 種別
Touch Cancel API 2.0.0 非同期I/F(イベントI/F)

概要

デバイスでタッチがキャンセルされたことを通知するイベント。

イベント情報

イベント名 Content-Type
/gotapi/touch/ontouchcancel application/json

メッセージ

論理名 物理名 データ型 省略 設定値
オブジェクト touch object - イベントの内容を保持するオブジェクト(object)。
オブジェクト touches object[] - タッチされているオブジェクトの配列。
属性値 id number - タッチを開始すると割り振られる、ユニーク(唯一)な識別番号。
属性値 x number - デバイスが持つ空間の左上を原点としたx座標。
属性値 y number - デバイスが持つ空間の左上を原点としたy座標

メッセージサンプル

{
    "product":"Device Connect Manager",
    "version":"x.x",
    "serviceId": “device1.localhost.deviceconnect.org",
    “api”: “gotapi”,
    "profile" : “touch”,
    "attribute" : "ontouchcancel",
    "sessionKey" : "0a93ac0aade4e046ed63eb24d1172f5f35c88ca60daa901547c28d5827cb418a5de1d7c5f9e62405",
    "touch" : {
         "touches": [
            {
                “id”:0,
                “x”:4,
                “y":5
            },
            {
                “id”:1,
                “x":54,
                “y":55
            },
         ]
     }
}
Clone this wiki locally