• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 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_I_PROCESS_INFO_SERVICE_H
18 #define ANDROID_I_PROCESS_INFO_SERVICE_H
19 
20 #ifndef __ANDROID_VNDK__
21 
22 #include <binder/IInterface.h>
23 
24 namespace android {
25 
26 // ----------------------------------------------------------------------
27 
28 class IProcessInfoService : public IInterface {
29 public:
30     DECLARE_META_INTERFACE(ProcessInfoService)
31 
32     virtual status_t    getProcessStatesFromPids( size_t length,
33                                                   /*in*/ int32_t* pids,
34                                                   /*out*/ int32_t* states) = 0;
35 
36     virtual status_t    getProcessStatesAndOomScoresFromPids( size_t length,
37                                                   /*in*/ int32_t* pids,
38                                                   /*out*/ int32_t* states,
39                                                   /*out*/ int32_t* scores) = 0;
40 
41     enum {
42         GET_PROCESS_STATES_FROM_PIDS = IBinder::FIRST_CALL_TRANSACTION,
43         GET_PROCESS_STATES_AND_OOM_SCORES_FROM_PIDS,
44     };
45 };
46 
47 // ----------------------------------------------------------------------
48 
49 }; // namespace android
50 
51 #else // __ANDROID_VNDK__
52 #error "This header is not visible to vendors"
53 #endif // __ANDROID_VNDK__
54 
55 #endif // ANDROID_I_PROCESS_INFO_SERVICE_H
56