update aidl files.
authorkfl_614 <kfl_614@163.com>
Thu, 31 Dec 2020 09:26:04 +0000 (17:26 +0800)
committerkfl_614 <kfl_614@163.com>
Thu, 31 Dec 2020 09:26:04 +0000 (17:26 +0800)
app/src/main/aidl/com/ic/aidl/temp/ITempAidlInterface.aidl [deleted file]
app/src/main/aidl/com/ic/aidl/temp/ITempRemoteService.aidl [deleted file]
app/src/main/aidl/com/ic/work/ITempSensorCallback.aidl [new file with mode: 0644]
app/src/main/aidl/com/ic/work/ITempSensorService.aidl [new file with mode: 0644]
app/src/main/aidl/com/ic/work/domain/Temperature.aidl [new file with mode: 0644]

diff --git a/app/src/main/aidl/com/ic/aidl/temp/ITempAidlInterface.aidl b/app/src/main/aidl/com/ic/aidl/temp/ITempAidlInterface.aidl
deleted file mode 100644 (file)
index 433313c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// ITempAidlInterface.aidl
-package com.ic.aidl.temp;
-
-interface ITempAidlInterface {
-    /**
-     * Demonstrates some basic types that you can use as parameters
-     * and return values in AIDL.
-     */
-     void updateCurrTempValue(double value,double animal,double tempOut);
-     void updateResultTempValue(double value,double animal,double tempOut);
-}
diff --git a/app/src/main/aidl/com/ic/aidl/temp/ITempRemoteService.aidl b/app/src/main/aidl/com/ic/aidl/temp/ITempRemoteService.aidl
deleted file mode 100644 (file)
index bad691f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// ITempRemoteService.aidl
-package com.ic.aidl.temp;
-
-// Declare any non-default types here with import statements
-
-import com.ic.aidl.temp.ITempAidlInterface;
-
-interface ITempRemoteService {
-    /**
-     * Demonstrates some basic types that you can use as parameters
-     * and return values in AIDL.
-     */
-    void registerCallback(ITempAidlInterface cb);
-    void unregisterCallback(ITempAidlInterface cb);
-
-    void onStartQueryTemp();
-    void onStopQueryTemp();
-}
diff --git a/app/src/main/aidl/com/ic/work/ITempSensorCallback.aidl b/app/src/main/aidl/com/ic/work/ITempSensorCallback.aidl
new file mode 100644 (file)
index 0000000..5e797fd
--- /dev/null
@@ -0,0 +1,15 @@
+// ITempSensorCallback.aidl
+package com.ic.work;
+
+import com.ic.work.domain.Temperature;
+
+interface ITempSensorCallback {
+    //获取到了温度数据,这个是最终数据
+    void onTemperatureGet(in Temperature temperature);
+   //温度数据更新中
+    void onTemperatureUpdating(in Temperature temperature);
+   //正在获取数据
+   void onGetingData();
+   //等待中
+   void onWaiting();
+}
\ No newline at end of file
diff --git a/app/src/main/aidl/com/ic/work/ITempSensorService.aidl b/app/src/main/aidl/com/ic/work/ITempSensorService.aidl
new file mode 100644 (file)
index 0000000..3d1847e
--- /dev/null
@@ -0,0 +1,13 @@
+// ITempSensorService.aidl
+package com.ic.work;
+import com.ic.work.ITempSensorCallback;
+
+interface ITempSensorService {
+    //注册接口
+    void registerCallback(in ITempSensorCallback callback,in String callbackTag);
+    //取消接口注册
+    void unRegisterCallback(in ITempSensorCallback callback);
+    //获取体温:0表示Alarm,1表示客户端用户发出的,3表示服务端发出的单次获取指令
+    //callbackTag,可以使用报名+类名的字符串组合
+    oneway void getTemperatureInfo(int from,in String callbackTag);
+}
\ No newline at end of file
diff --git a/app/src/main/aidl/com/ic/work/domain/Temperature.aidl b/app/src/main/aidl/com/ic/work/domain/Temperature.aidl
new file mode 100644 (file)
index 0000000..a820f77
--- /dev/null
@@ -0,0 +1,4 @@
+// Temperature.aidl
+package com.ic.work.domain;
+
+parcelable Temperature;
\ No newline at end of file