Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions generated/binder-user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,18 @@ int binder_report_rsp_parse(const struct nlmsghdr *nlh,
return YNL_PARSE_CB_OK;
}

static void binder_report_free(struct ynl_ntf_base_type* ntf) {
auto* typed_ntf = reinterpret_cast<binder_report*>(ntf);
typed_ntf->obj.~binder_report_rsp();
free(ntf);
}

static constexpr std::array<ynl_ntf_info, BINDER_CMD_REPORT + 1> binder_ntf_info = []() {
std::array<ynl_ntf_info, BINDER_CMD_REPORT + 1> arr{};
arr[BINDER_CMD_REPORT].policy = &binder_report_nest;
arr[BINDER_CMD_REPORT].cb = binder_report_rsp_parse;
arr[BINDER_CMD_REPORT].alloc_sz = sizeof(binder_report);
arr[BINDER_CMD_REPORT].free = binder_report_free;
return arr;
} ();

Expand Down
5 changes: 5 additions & 0 deletions generated/binder-user.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ struct binder_report_rsp {
};

struct binder_report {
__u16 family;
__u8 cmd;
struct ynl_ntf_base_type* next;
void (*free)(struct ynl_ntf_base_type* ntf);
binder_report_rsp obj __attribute__((aligned(8)));
};

} //namespace ynl_cpp
Expand Down
24 changes: 24 additions & 0 deletions generated/dpll-user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,12 @@ dpll_device_get_dump(ynl_cpp::ynl_socket& ys)
}

/* DPLL_CMD_DEVICE_GET - notify */
static void dpll_device_get_ntf_free(struct ynl_ntf_base_type* ntf) {
auto* typed_ntf = reinterpret_cast<dpll_device_get_ntf*>(ntf);
typed_ntf->obj.~dpll_device_get_rsp();
free(ntf);
}

/* ============== DPLL_CMD_DEVICE_SET ============== */
/* DPLL_CMD_DEVICE_SET - do */
int dpll_device_set(ynl_cpp::ynl_socket& ys, dpll_device_set_req& req)
Expand Down Expand Up @@ -1118,6 +1124,12 @@ dpll_pin_get_dump(ynl_cpp::ynl_socket& ys, dpll_pin_get_req_dump& req)
}

/* DPLL_CMD_PIN_GET - notify */
static void dpll_pin_get_ntf_free(struct ynl_ntf_base_type* ntf) {
auto* typed_ntf = reinterpret_cast<dpll_pin_get_ntf*>(ntf);
typed_ntf->obj.~dpll_pin_get_rsp();
free(ntf);
}

/* ============== DPLL_CMD_PIN_SET ============== */
/* DPLL_CMD_PIN_SET - do */
int dpll_pin_set(ynl_cpp::ynl_socket& ys, dpll_pin_set_req& req)
Expand Down Expand Up @@ -1172,16 +1184,28 @@ static constexpr std::array<ynl_ntf_info, DPLL_CMD_PIN_CHANGE_NTF + 1> dpll_ntf_
std::array<ynl_ntf_info, DPLL_CMD_PIN_CHANGE_NTF + 1> arr{};
arr[DPLL_CMD_DEVICE_CREATE_NTF].policy = &dpll_nest;
arr[DPLL_CMD_DEVICE_CREATE_NTF].cb = dpll_device_get_rsp_parse;
arr[DPLL_CMD_DEVICE_CREATE_NTF].alloc_sz = sizeof(dpll_device_get_ntf);
arr[DPLL_CMD_DEVICE_CREATE_NTF].free = dpll_device_get_ntf_free;
arr[DPLL_CMD_DEVICE_DELETE_NTF].policy = &dpll_nest;
arr[DPLL_CMD_DEVICE_DELETE_NTF].cb = dpll_device_get_rsp_parse;
arr[DPLL_CMD_DEVICE_DELETE_NTF].alloc_sz = sizeof(dpll_device_get_ntf);
arr[DPLL_CMD_DEVICE_DELETE_NTF].free = dpll_device_get_ntf_free;
arr[DPLL_CMD_DEVICE_CHANGE_NTF].policy = &dpll_nest;
arr[DPLL_CMD_DEVICE_CHANGE_NTF].cb = dpll_device_get_rsp_parse;
arr[DPLL_CMD_DEVICE_CHANGE_NTF].alloc_sz = sizeof(dpll_device_get_ntf);
arr[DPLL_CMD_DEVICE_CHANGE_NTF].free = dpll_device_get_ntf_free;
arr[DPLL_CMD_PIN_CREATE_NTF].policy = &dpll_pin_nest;
arr[DPLL_CMD_PIN_CREATE_NTF].cb = dpll_pin_get_rsp_parse;
arr[DPLL_CMD_PIN_CREATE_NTF].alloc_sz = sizeof(dpll_pin_get_ntf);
arr[DPLL_CMD_PIN_CREATE_NTF].free = dpll_pin_get_ntf_free;
arr[DPLL_CMD_PIN_DELETE_NTF].policy = &dpll_pin_nest;
arr[DPLL_CMD_PIN_DELETE_NTF].cb = dpll_pin_get_rsp_parse;
arr[DPLL_CMD_PIN_DELETE_NTF].alloc_sz = sizeof(dpll_pin_get_ntf);
arr[DPLL_CMD_PIN_DELETE_NTF].free = dpll_pin_get_ntf_free;
arr[DPLL_CMD_PIN_CHANGE_NTF].policy = &dpll_pin_nest;
arr[DPLL_CMD_PIN_CHANGE_NTF].cb = dpll_pin_get_rsp_parse;
arr[DPLL_CMD_PIN_CHANGE_NTF].alloc_sz = sizeof(dpll_pin_get_ntf);
arr[DPLL_CMD_PIN_CHANGE_NTF].free = dpll_pin_get_ntf_free;
return arr;
} ();

Expand Down
10 changes: 10 additions & 0 deletions generated/dpll-user.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ dpll_device_get_dump(ynl_cpp::ynl_socket& ys);

/* DPLL_CMD_DEVICE_GET - notify */
struct dpll_device_get_ntf {
__u16 family;
__u8 cmd;
struct ynl_ntf_base_type* next;
void (*free)(struct ynl_ntf_base_type* ntf);
dpll_device_get_rsp obj __attribute__((aligned(8)));
};

/* ============== DPLL_CMD_DEVICE_SET ============== */
Expand Down Expand Up @@ -212,6 +217,11 @@ dpll_pin_get_dump(ynl_cpp::ynl_socket& ys, dpll_pin_get_req_dump& req);

/* DPLL_CMD_PIN_GET - notify */
struct dpll_pin_get_ntf {
__u16 family;
__u8 cmd;
struct ynl_ntf_base_type* next;
void (*free)(struct ynl_ntf_base_type* ntf);
dpll_pin_get_rsp obj __attribute__((aligned(8)));
};

/* ============== DPLL_CMD_PIN_SET ============== */
Expand Down
Loading