| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
#ifndef ADB_H |
| 18 |
#define ADB_H |
| 19 |
|
| 20 |
#include "proto/instrumentation_data.pb.h" |
| 21 |
|
| 22 |
#include <string> |
| 23 |
|
| 24 |
using namespace android::am; |
| 25 |
using namespace google::protobuf; |
| 26 |
using namespace std; |
| 27 |
|
| 28 |
class InstrumentationCallbacks { |
| 29 |
public: |
| 30 |
virtual void OnTestStatus(TestStatus& status) = 0; |
| 31 |
virtual void OnSessionStatus(SessionStatus& status) = 0; |
| 32 |
}; |
| 33 |
|
| 34 |
int run_adb(const char* first, ...); |
| 35 |
|
| 36 |
string get_system_property(const string& name, int* err); |
| 37 |
|
| 38 |
int run_instrumentation_test(const string& packageName, const string& runner, |
| 39 |
const string& className, InstrumentationCallbacks* callbacks); |
| 40 |
|
| 41 |
string get_bundle_string(const ResultsBundle& bundle, bool* found, ...); |
| 42 |
int32_t get_bundle_int(const ResultsBundle& bundle, bool* found, ...); |
| 43 |
float get_bundle_float(const ResultsBundle& bundle, bool* found, ...); |
| 44 |
double get_bundle_double(const ResultsBundle& bundle, bool* found, ...); |
| 45 |
int64_t get_bundle_long(const ResultsBundle& bundle, bool* found, ...); |
| 46 |
|
| 47 |
#endif |