1 /* 2 * Copyright (C) 2009 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_IOMXSTORE_H_ 18 19 #define ANDROID_IOMXSTORE_H_ 20 21 #include <media/IOMX.h> 22 #include <android/hardware/media/omx/1.0/IOmxStore.h> 23 24 #include <binder/IInterface.h> 25 #include <binder/IBinder.h> 26 27 #include <vector> 28 #include <string> 29 30 namespace android { 31 32 using hardware::media::omx::V1_0::IOmxStore; 33 34 class IOMXStore : public IInterface { 35 public: 36 DECLARE_META_INTERFACE(OMXStore); 37 38 struct Attribute { 39 std::string key; 40 std::string value; 41 }; 42 43 struct NodeInfo { 44 std::string name; 45 std::string owner; 46 std::vector<Attribute> attributes; 47 }; 48 49 struct RoleInfo { 50 std::string role; 51 std::string type; 52 bool isEncoder; 53 bool preferPlatformNodes; 54 std::vector<NodeInfo> nodes; 55 }; 56 57 virtual status_t listServiceAttributes( 58 std::vector<Attribute>* attributes) = 0; 59 60 virtual status_t getNodePrefix(std::string* prefix) = 0; 61 62 virtual status_t listRoles(std::vector<RoleInfo>* roleList) = 0; 63 64 virtual status_t getOmx(const std::string& name, sp<IOMX>* omx) = 0; 65 }; 66 67 68 //////////////////////////////////////////////////////////////////////////////// 69 70 class BnOMXStore : public BnInterface<IOMXStore> { 71 public: 72 virtual status_t onTransact( 73 uint32_t code, const Parcel &data, Parcel *reply, 74 uint32_t flags = 0); 75 }; 76 77 } // namespace android 78 79 #endif // ANDROID_IOMX_H_ 80