Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af8f6fc6 authored by Chris Manton's avatar Chris Manton
Browse files

Add generated fbs files

Bug: 157647700
Test: atest --host bluetooth_test_gd
Tag: #gd-refactor
Change-Id: I462a9eaf893b6620880abbca81f0c6905224cd17
parent 47a3e0c3
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
@@ -150,6 +150,7 @@ cc_defaults {
    ],
    generated_headers: [
        "BluetoothGeneratedBundler_h",
        "BluetoothGeneratedFlatbuffers_h",
        "BluetoothGeneratedPackets_h",
        "BluetoothGeneratedDumpsysData_h",
    ],
@@ -437,6 +438,23 @@ genrule {
    ],
}

// Generates binary schema data to be bundled and source file generated
genrule {
    name: "BluetoothGeneratedModuleSchemaData_h",
    tools: [
        "flatc",
    ],
    cmd: "$(location flatc) -I packages/modules/Bluetooth/system/gd -b --schema -o $(genDir) $(in) ",
    srcs: [
        "dumpsys_data.fbs",
        "shim/dumpsys.fbs",
    ],
    out: [
        "dumpsys_data.bfbs",
        "dumpsys.bfbs",
    ],
}

genrule {
    name: "BluetoothGeneratedDumpsysData_h",
    tools: [
@@ -445,9 +463,27 @@ genrule {
    cmd: "$(location flatc) -I packages/modules/Bluetooth/system/gd -o $(genDir) --cpp $(in) ",
    srcs: [
        "dumpsys_data.fbs",
        "shim/dumpsys.fbs",
    ],
    out: [
        "dumpsys_data_generated.h",
        "dumpsys_generated.h",
    ],
}

// Generates binary bundled source file for inclusion into library
genrule {
    name: "BluetoothGeneratedFlatbuffers_h",
    tools: [
            "bluetooth_flatbuffer_bundler",
    ],
    cmd: "$(location bluetooth_flatbuffer_bundler) -w -m DumpsysData -f module_schema_data -n bluetooth::dumpsys -g $(genDir) $(locations :BluetoothGeneratedModuleSchemaData_h)",
    srcs: [
        "*.bfbs",
        ":BluetoothGeneratedModuleSchemaData_h",
    ],
    out: [
         "module_schema_data.h",
    ],
}

+2 −2
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ cc_binary {
    generated_headers: [
        "BluetoothGeneratedBundler_h",
    ],
    shared_libs: [
    static_libs: [
        "libflatbuffers-cpp",
    ],
    sanitize: {
@@ -64,7 +64,7 @@ cc_test {
    srcs: [
        ":BluetoothFlatbufferBundlerTestSources",
    ],
    shared_libs: [
    static_libs: [
        "libflatbuffers-cpp",
    ],
    sanitize: {
+10 −0
Original line number Diff line number Diff line
// shim::dumpsys data
namespace bluetooth.shim;

attribute "privacy";

table DumpsysModuleData {
    title:string (privacy:"Any");
}

root_type DumpsysModuleData;