blob: 57c527b5944e5fce1a567f296ea29d7f4a5d8d8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#ifndef IPROXY_SERVICE_H
#define IPROXY_SERVICE_H
#include <binder/IInterface.h>
#include <binder/IBinder.h>
namespace android {
class IProxyService : public IInterface {
public:
/**
* Keep up-to-date with
* frameworks/base/packages/services/Proxy/com/android/net/IProxyService.aidl
*/
enum {
RESOLVE_PROXIES = IBinder::FIRST_CALL_TRANSACTION,
SET_PAC,
START_PAC,
STOP_PAC,
};
public:
DECLARE_META_INTERFACE(ProxyService);
public:
virtual String16 resolveProxies(String16 host, String16 url) = 0;
virtual void setPacFile(String16& scriptContents) = 0;
virtual void startPacSystem() = 0;
virtual void stopPacSystem() = 0;
private:
};
class BpProxyService : public BpInterface<IProxyService> {
public:
BpProxyService(const sp<IBinder>& impl) : BpInterface<IProxyService>(impl) {}
virtual String16 resolveProxies(String16 host, String16 url);
virtual void setPacFile(String16& scriptContents);
virtual void startPacSystem();
virtual void stopPacSystem();
};
class BnProxyService : public BnInterface<IProxyService> {
public:
virtual status_t onTransact(
uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags = 0);
private:
int getCallingUid();
bool notSystemUid();
};
}
#endif //IPROXY_SERVICE_H
|