hidl::{Parcel,Binder & friends} => hardware::\1
diff --git a/CompoundType.cpp b/CompoundType.cpp
index e37df7d..da256e1 100644
--- a/CompoundType.cpp
+++ b/CompoundType.cpp
@@ -173,7 +173,7 @@
out.indent();
out.indent();
- out << "const ::android::hidl::Parcel &parcel,\n"
+ out << "const ::android::hardware::Parcel &parcel,\n"
<< "size_t parentHandle,\n"
<< "size_t parentOffset);\n\n";
@@ -185,7 +185,7 @@
out.indent();
out.indent();
- out << "::android::hidl::Parcel *parcel,\n"
+ out << "::android::hardware::Parcel *parcel,\n"
<< "size_t parentHandle,\n"
<< "size_t parentOffset) const;\n";
@@ -230,9 +230,9 @@
out.indent();
if (isReader) {
- out << "const ::android::hidl::Parcel &parcel,\n";
+ out << "const ::android::hardware::Parcel &parcel,\n";
} else {
- out << "::android::hidl::Parcel *parcel,\n";
+ out << "::android::hardware::Parcel *parcel,\n";
}
out << "size_t parentHandle,\n"
diff --git a/Interface.cpp b/Interface.cpp
index 9c2ad27..158f874 100644
--- a/Interface.cpp
+++ b/Interface.cpp
@@ -52,7 +52,7 @@
if (isReader) {
const std::string binderName = "_aidl_" + name + "_binder";
- out << "::android::sp<::android::hidl::IBinder> "
+ out << "::android::sp<::android::hardware::IBinder> "
<< binderName << ";\n";
out << "_aidl_err = ";
diff --git a/StringType.cpp b/StringType.cpp
index 0e3d802..6f9bc21 100644
--- a/StringType.cpp
+++ b/StringType.cpp
@@ -9,7 +9,7 @@
std::string StringType::getCppType(StorageMode mode, std::string *extra) const {
extra->clear();
- const std::string base = "::android::hidl::hidl_string";
+ const std::string base = "::android::hardware::hidl_string";
switch (mode) {
case StorageMode_Stack:
@@ -38,7 +38,7 @@
if (isReader) {
out << name
- << " = (const ::android::hidl::hidl_string *)"
+ << " = (const ::android::hardware::hidl_string *)"
<< parcelObjDeref
<< "readBuffer("
<< "&"
@@ -102,7 +102,7 @@
mode,
parentName,
offsetText,
- "::android::hidl::hidl_string",
+ "::android::hardware::hidl_string",
"" /* childName */);
}
diff --git a/VectorType.cpp b/VectorType.cpp
index 6c96a64..d1cec2d 100644
--- a/VectorType.cpp
+++ b/VectorType.cpp
@@ -12,7 +12,7 @@
std::string VectorType::getCppType(StorageMode mode, std::string *extra) const {
const std::string base =
- "::android::hidl::hidl_vec<"
+ "::android::hardware::hidl_vec<"
+ mElementType->getCppType(extra)
+ ">";
@@ -49,7 +49,7 @@
if (isReader) {
out << name
- << " = (const ::android::hidl::hidl_vec<"
+ << " = (const ::android::hardware::hidl_vec<"
<< baseType
<< "> *)"
<< parcelObjDeref
diff --git a/generateCpp.cpp b/generateCpp.cpp
index 3f35c38..39aa867 100644
--- a/generateCpp.cpp
+++ b/generateCpp.cpp
@@ -192,7 +192,7 @@
if (superType != NULL) {
out << superType->fullName();
} else {
- out << "::android::hidl::IInterface";
+ out << "::android::hardware::IInterface";
}
out << " {\n";
@@ -228,7 +228,7 @@
out << superType->fullName()
<< "::Call::CallCount";
} else {
- out << "::android::hidl::IBinder::FIRST_CALL_TRANSACTION";
+ out << "::android::hardware::IBinder::FIRST_CALL_TRANSACTION";
}
first = false;
@@ -266,7 +266,7 @@
for (const auto &method : iface->methods()) {
const bool returnsValue = !method->results().empty();
- out << "virtual ::android::hidl::binder::Status "
+ out << "virtual ::android::hardware::Status "
<< method->name()
<< "("
<< Method::GetSignature(method->args());
@@ -351,7 +351,7 @@
out << "struct "
<< "Bn"
<< baseName
- << " : public ::android::hidl::BnInterface<"
+ << " : public ::android::hardware::BnInterface<"
<< ifaceName
<< "> {\n";
@@ -361,8 +361,8 @@
out.indent();
out.indent();
out << "uint32_t _aidl_code,\n";
- out << "const ::android::hidl::Parcel &_aidl_data,\n";
- out << "::android::hidl::Parcel *_aidl_reply,\n";
+ out << "const ::android::hardware::Parcel &_aidl_data,\n";
+ out << "::android::hardware::Parcel *_aidl_reply,\n";
out << "uint32_t _aidl_flags = 0,\n";
out << "TransactCallback _aidl_cb = nullptr) override;\n";
out.unindent();
@@ -429,7 +429,7 @@
out << "struct "
<< "Bp"
<< baseName
- << " : public ::android::hidl::BpInterface<"
+ << " : public ::android::hardware::BpInterface<"
<< ifaceName
<< "> {\n";
@@ -437,7 +437,7 @@
out << "explicit Bp"
<< baseName
- << "(const ::android::sp<::android::hidl::IBinder> &_aidl_impl);"
+ << "(const ::android::sp<::android::hardware::IBinder> &_aidl_impl);"
<< "\n\n";
const Interface *iface = mRootScope->getInterface();
@@ -458,7 +458,7 @@
for (const auto &method : superInterface->methods()) {
const bool returnsValue = !method->results().empty();
- out << "::android::hidl::binder::Status "
+ out << "::android::hardware::Status "
<< method->name()
<< "("
<< Method::GetSignature(method->args());
@@ -600,7 +600,7 @@
out << klassName
<< "::"
<< klassName
- << "(const ::android::sp<::android::hidl::IBinder> &_aidl_impl)\n";
+ << "(const ::android::sp<::android::hardware::IBinder> &_aidl_impl)\n";
out.indent();
out.indent();
@@ -628,7 +628,7 @@
for (const auto &method : superInterface->methods()) {
const bool returnsValue = !method->results().empty();
- out << "::android::hidl::binder::Status "
+ out << "::android::hardware::Status "
<< klassName
<< "::"
<< method->name()
@@ -647,10 +647,10 @@
out.indent();
- out << "::android::hidl::Parcel _aidl_data;\n";
- out << "::android::hidl::Parcel _aidl_reply;\n";
+ out << "::android::hardware::Parcel _aidl_data;\n";
+ out << "::android::hardware::Parcel _aidl_reply;\n";
out << "::android::status_t _aidl_err;\n\n";
- out << "::android::hidl::binder::Status _aidl_status;\n";
+ out << "::android::hardware::Status _aidl_status;\n";
out << "_aidl_err = _aidl_data.writeInterfaceToken("
<< superInterface->fullName()
@@ -747,8 +747,8 @@
out.indent();
out << "uint32_t _aidl_code,\n"
- << "const ::android::hidl::Parcel &_aidl_data,\n"
- << "::android::hidl::Parcel *_aidl_reply,\n"
+ << "const ::android::hardware::Parcel &_aidl_data,\n"
+ << "::android::hardware::Parcel *_aidl_reply,\n"
<< "uint32_t _aidl_flags,\n"
<< "TransactCallback _aidl_cb) {\n";
@@ -794,7 +794,7 @@
out << "default:\n{\n";
out.indent();
- out << "return ::android::hidl::BnInterface<I"
+ out << "return ::android::hardware::BnInterface<I"
<< baseName
<< ">::onTransact(\n";
@@ -815,10 +815,10 @@
out << "if (_aidl_err == ::android::UNEXPECTED_NULL) {\n";
out.indent();
- out << "_aidl_err = ::android::hidl::binder::Status::fromExceptionCode(\n";
+ out << "_aidl_err = ::android::hardware::Status::fromExceptionCode(\n";
out.indent();
out.indent();
- out << "::android::hidl::binder::Status::EX_NULL_POINTER)\n";
+ out << "::android::hardware::Status::EX_NULL_POINTER)\n";
out.indent();
out.indent();
out << ".writeToParcel(_aidl_reply);\n";
@@ -866,7 +866,7 @@
out << "bool _aidl_callbackCalled = false;\n\n";
}
- out << "::android::hidl::binder::Status _aidl_status(\n";
+ out << "::android::hardware::Status _aidl_status(\n";
out.indent();
out.indent();
out << method->name() << "(";
@@ -908,7 +908,7 @@
out.indent();
out << "_aidl_callbackCalled = true;\n\n";
- out << "::android::hidl::binder::Status::ok()"
+ out << "::android::hardware::Status::ok()"
<< ".writeToParcel(_aidl_reply);\n\n";
for (const auto &arg : method->results()) {
diff --git a/test/main.cpp b/test/main.cpp
index 54470bb..eef73e7 100644
--- a/test/main.cpp
+++ b/test/main.cpp
@@ -15,9 +15,9 @@
using ::android::hardware::foo::V1_0::IFoo;
using ::android::hardware::foo::V1_0::IFooCallback;
using ::android::hardware::bar::V1_0::IBar;
-using ::android::hidl::binder::Status;
-using ::android::hidl::hidl_vec;
-using ::android::hidl::hidl_string;
+using ::android::hardware::Status;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::hidl_string;
using ::android::sp;
struct FooCallback : public BnFooCallback {
@@ -251,7 +251,7 @@
}
static void client() {
- using namespace android::hidl;
+ using namespace android::hardware;
using android::String16;
const hidl_version kVersion = make_hidl_version(1, 0);
@@ -350,7 +350,7 @@
}
int main() {
- using namespace android::hidl;
+ using namespace android::hardware;
using android::String16;
if (fork() == 0) {