blob: 39cd654e9be7a6b05476b307adae7c956e96723a
1 | #ifndef ANDROID_AMLOGIC_ITV_H |
2 | #define ANDROID_AMLOGIC_ITV_H |
3 | |
4 | #include <utils/RefBase.h> |
5 | #include <binder/IInterface.h> |
6 | #include <binder/Parcel.h> |
7 | #include <binder/IMemory.h> |
8 | #include <utils/String8.h> |
9 | #include <include/Tv.h> |
10 | |
11 | using namespace android; |
12 | |
13 | class ITvClient; |
14 | |
15 | class ITv: public IInterface { |
16 | public: |
17 | DECLARE_META_INTERFACE(Tv); |
18 | |
19 | virtual void disconnect() = 0; |
20 | |
21 | // connect new client with existing tv remote |
22 | virtual status_t connect(const sp<ITvClient> &client) = 0; |
23 | |
24 | // prevent other processes from using this ITv interface |
25 | virtual status_t lock() = 0; |
26 | |
27 | // allow other processes to use this ITv interface |
28 | virtual status_t unlock() = 0; |
29 | |
30 | virtual status_t processCmd(const Parcel &p, Parcel *r) = 0; |
31 | |
32 | //share mem for subtitle bmp |
33 | virtual status_t createSubtitle(const sp<IMemory> &share_mem) = 0; |
34 | //share mem for video/hdmi bmp |
35 | virtual status_t createVideoFrame(const sp<IMemory> &share_mem) = 0; |
36 | |
37 | }; |
38 | |
39 | // ---------------------------------------------------------------------------- |
40 | |
41 | class BnTv: public BnInterface<ITv> { |
42 | public: |
43 | virtual status_t onTransact( uint32_t code, |
44 | const Parcel &data, |
45 | Parcel *reply, |
46 | uint32_t flags = 0); |
47 | }; |
48 | |
49 | #endif |
50 |