X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dbus%2Fkdbus-common.h;h=9958dd588fac405456e99bc603e91532ea503487;hb=61d97215c317a4154df47fbfb882aab60b92fbab;hp=4a6a66406bafba24d183c363e01998da1b66666d;hpb=5f834343b7f6ec27a254367641f2736b39e85ccd;p=platform%2Fupstream%2Fdbus.git diff --git a/dbus/kdbus-common.h b/dbus/kdbus-common.h index 4a6a664..9958dd5 100644 --- a/dbus/kdbus-common.h +++ b/dbus/kdbus-common.h @@ -29,11 +29,17 @@ #include #include +#include #define KDBUS_ALIGN8(l) (((l) + 7) & ~7) #define KDBUS_PART_NEXT(part) \ (typeof(part))(((uint8_t *)part) + KDBUS_ALIGN8((part)->size)) -#define KDBUS_ITEM_SIZE(s) KDBUS_ALIGN8((s) + KDBUS_PART_HEADER_SIZE) +#define KDBUS_MSG_MAX_PAYLOAD_VEC_SIZE 0x00800000 /* maximum size of message header and items */ +#define KDBUS_PART_HEADER_SIZE offsetof(struct kdbus_item, data) +#define KDBUS_PART_SIZE(s) KDBUS_ALIGN8((s) + KDBUS_PART_HEADER_SIZE) + +//todo restore if DBus policy will be applied in kdbus somehow +#define POLICY_TO_KDBUS dbus_bool_t register_kdbus_policy(const char* name, DBusTransport *transport, unsigned long int uid); int request_kdbus_name(int fd, const char *name, const __u64 flags, __u64 id);