Home | History | Annotate | Download | only in fingerprintd
      1 /*
      2  * Copyright (C) 2015 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #ifndef IFINGERPRINT_DAEMON_CALLBACK_H_
     18 #define IFINGERPRINT_DAEMON_CALLBACK_H_
     19 
     20 #include <inttypes.h>
     21 #include <utils/Errors.h>
     22 #include <binder/IInterface.h>
     23 #include <binder/Parcel.h>
     24 
     25 namespace android {
     26 
     27 /*
     28 * Communication channel back to FingerprintService.java
     29 */
     30 class IFingerprintDaemonCallback : public IInterface {
     31     public:
     32         // must be kept in sync with IFingerprintService.aidl
     33         enum {
     34             ON_ENROLL_RESULT = IBinder::FIRST_CALL_TRANSACTION + 0,
     35             ON_ACQUIRED = IBinder::FIRST_CALL_TRANSACTION + 1,
     36             ON_AUTHENTICATED = IBinder::FIRST_CALL_TRANSACTION + 2,
     37             ON_ERROR = IBinder::FIRST_CALL_TRANSACTION + 3,
     38             ON_REMOVED = IBinder::FIRST_CALL_TRANSACTION + 4,
     39             ON_ENUMERATE = IBinder::FIRST_CALL_TRANSACTION + 5,
     40         };
     41 
     42         virtual status_t onEnrollResult(int64_t devId, int32_t fpId, int32_t gpId, int32_t rem) = 0;
     43         virtual status_t onAcquired(int64_t devId, int32_t acquiredInfo) = 0;
     44         virtual status_t onAuthenticated(int64_t devId, int32_t fingerId, int32_t groupId) = 0;
     45         virtual status_t onError(int64_t devId, int32_t error) = 0;
     46         virtual status_t onRemoved(int64_t devId, int32_t fingerId, int32_t groupId) = 0;
     47         virtual status_t onEnumerate(int64_t devId, int32_t fingerId, int32_t groupId, int32_t rem) = 0;
     48 
     49         DECLARE_META_INTERFACE(FingerprintDaemonCallback);
     50 };
     51 
     52 }; // namespace android
     53 
     54 #endif // IFINGERPRINT_DAEMON_CALLBACK_H_
     55