Home | History | Annotate | Download | only in include
      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 ANDROID_IVEHICLE_MONITOR_LISTENER_H
     18 #define ANDROID_IVEHICLE_MONITOR_LISTENER_H
     19 
     20 #include <binder/Parcel.h>
     21 
     22 namespace android {
     23 
     24 // ----------------------------------------------------------------------------
     25 
     26 class IVehicleMonitorListener : public IInterface
     27 {
     28 public:
     29     DECLARE_META_INTERFACE(VehicleMonitorListener);
     30 
     31     /**
     32      * Notifies when app misbehaved. Client (Bn implementor) should
     33      * hold sp to keep the data received outside this call.
     34      */
     35     virtual void onAppViolation(
     36             int32_t pid, int32_t uid, int32_t action, int32_t violation) = 0;
     37 };
     38 
     39 // ----------------------------------------------------------------------------
     40 
     41 class BnVehicleMonitorListener : public BnInterface<IVehicleMonitorListener>
     42 {
     43     virtual status_t  onTransact(uint32_t code,
     44                                  const Parcel& data,
     45                                  Parcel* reply,
     46                                  uint32_t flags = 0);
     47 };
     48 
     49 // ----------------------------------------------------------------------------
     50 
     51 }; // namespace android
     52 
     53 #endif /* ANDROID_IVEHICLE_MONITOR_LISTENER_H */
     54