tethering: add protobuf messages for display feature 44/23044/1
authorKitae Kim <kt920.kim@samsung.com>
Fri, 23 May 2014 11:22:05 +0000 (20:22 +0900)
committerKitae Kim <kt920.kim@samsung.com>
Mon, 16 Jun 2014 11:01:13 +0000 (20:01 +0900)
Change-Id: I019256786e9c9309fedf7cfc003d66fdceca7c19
Signed-off-by: Kitae Kim <kt920.kim@samsung.com>
tizen/src/tethering/genmsg/tethering.pb-c.c
tizen/src/tethering/genmsg/tethering.pb-c.h
tizen/src/tethering/msg/tethering.proto

index ad16dc1e9bef1e371f9919679b0e18b90ab6fb35..fe58d32af8c84d38550c3fbcb5399d14d3b55c1d 100644 (file)
@@ -565,6 +565,49 @@ void   tethering__resolution__free_unpacked
   PROTOBUF_C_ASSERT (message->base.descriptor == &tethering__resolution__descriptor);
   protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
 }
+void   tethering__display_msg__init
+                     (Tethering__DisplayMsg         *message)
+{
+  static Tethering__DisplayMsg init_value = TETHERING__DISPLAY_MSG__INIT;
+  *message = init_value;
+}
+size_t tethering__display_msg__get_packed_size
+                     (const Tethering__DisplayMsg *message)
+{
+  PROTOBUF_C_ASSERT (message->base.descriptor == &tethering__display_msg__descriptor);
+  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
+}
+size_t tethering__display_msg__pack
+                     (const Tethering__DisplayMsg *message,
+                      uint8_t       *out)
+{
+  PROTOBUF_C_ASSERT (message->base.descriptor == &tethering__display_msg__descriptor);
+  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
+}
+size_t tethering__display_msg__pack_to_buffer
+                     (const Tethering__DisplayMsg *message,
+                      ProtobufCBuffer *buffer)
+{
+  PROTOBUF_C_ASSERT (message->base.descriptor == &tethering__display_msg__descriptor);
+  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
+}
+Tethering__DisplayMsg *
+       tethering__display_msg__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data)
+{
+  return (Tethering__DisplayMsg *)
+     protobuf_c_message_unpack (&tethering__display_msg__descriptor,
+                                allocator, len, data);
+}
+void   tethering__display_msg__free_unpacked
+                     (Tethering__DisplayMsg *message,
+                      ProtobufCAllocator *allocator)
+{
+  PROTOBUF_C_ASSERT (message->base.descriptor == &tethering__display_msg__descriptor);
+  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
+}
 void   tethering__multi_touch_max_count__init
                      (Tethering__MultiTouchMaxCount         *message)
 {
@@ -1455,6 +1498,70 @@ const ProtobufCMessageDescriptor tethering__resolution__descriptor =
   (ProtobufCMessageInit) tethering__resolution__init,
   NULL,NULL,NULL    /* reserved[123] */
 };
+static const ProtobufCFieldDescriptor tethering__display_msg__field_descriptors[3] =
+{
+  {
+    "onOff",
+    2,
+    PROTOBUF_C_LABEL_REQUIRED,
+    PROTOBUF_C_TYPE_BOOL,
+    0,   /* quantifier_offset */
+    PROTOBUF_C_OFFSETOF(Tethering__DisplayMsg, onoff),
+    NULL,
+    NULL,
+    0,            /* packed */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "frameRate",
+    3,
+    PROTOBUF_C_LABEL_OPTIONAL,
+    PROTOBUF_C_TYPE_INT32,
+    PROTOBUF_C_OFFSETOF(Tethering__DisplayMsg, has_framerate),
+    PROTOBUF_C_OFFSETOF(Tethering__DisplayMsg, framerate),
+    NULL,
+    NULL,
+    0,            /* packed */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+  {
+    "imageData",
+    4,
+    PROTOBUF_C_LABEL_OPTIONAL,
+    PROTOBUF_C_TYPE_BYTES,
+    PROTOBUF_C_OFFSETOF(Tethering__DisplayMsg, has_imagedata),
+    PROTOBUF_C_OFFSETOF(Tethering__DisplayMsg, imagedata),
+    NULL,
+    NULL,
+    0,            /* packed */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
+};
+static const unsigned tethering__display_msg__field_indices_by_name[] = {
+  1,   /* field[1] = frameRate */
+  2,   /* field[2] = imageData */
+  0,   /* field[0] = onOff */
+};
+static const ProtobufCIntRange tethering__display_msg__number_ranges[1 + 1] =
+{
+  { 2, 0 },
+  { 0, 3 }
+};
+const ProtobufCMessageDescriptor tethering__display_msg__descriptor =
+{
+  PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC,
+  "tethering.DisplayMsg",
+  "DisplayMsg",
+  "Tethering__DisplayMsg",
+  "tethering",
+  sizeof(Tethering__DisplayMsg),
+  3,
+  tethering__display_msg__field_descriptors,
+  tethering__display_msg__field_indices_by_name,
+  1,  tethering__display_msg__number_ranges,
+  (ProtobufCMessageInit) tethering__display_msg__init,
+  NULL,NULL,NULL    /* reserved[123] */
+};
 static const int32_t tethering__multi_touch_max_count__max__default_value = 10;
 static const ProtobufCFieldDescriptor tethering__multi_touch_max_count__field_descriptors[1] =
 {
@@ -1574,7 +1681,7 @@ const ProtobufCMessageDescriptor tethering__multi_touch_data__descriptor =
   (ProtobufCMessageInit) tethering__multi_touch_data__init,
   NULL,NULL,NULL    /* reserved[123] */
 };
-const ProtobufCEnumValue tethering__multi_touch_msg__type__enum_values_by_number[6] =
+const ProtobufCEnumValue tethering__multi_touch_msg__type__enum_values_by_number[7] =
 {
   { "START_REQ", "TETHERING__MULTI_TOUCH_MSG__TYPE__START_REQ", 2 },
   { "START_ANS", "TETHERING__MULTI_TOUCH_MSG__TYPE__START_ANS", 3 },
@@ -1582,12 +1689,14 @@ const ProtobufCEnumValue tethering__multi_touch_msg__type__enum_values_by_number
   { "MAX_COUNT", "TETHERING__MULTI_TOUCH_MSG__TYPE__MAX_COUNT", 5 },
   { "TOUCH_DATA", "TETHERING__MULTI_TOUCH_MSG__TYPE__TOUCH_DATA", 6 },
   { "RESOLUTION", "TETHERING__MULTI_TOUCH_MSG__TYPE__RESOLUTION", 7 },
+  { "DISPLAY", "TETHERING__MULTI_TOUCH_MSG__TYPE__DISPLAY", 8 },
 };
 static const ProtobufCIntRange tethering__multi_touch_msg__type__value_ranges[] = {
-{2, 0},{0, 6}
+{2, 0},{0, 7}
 };
-const ProtobufCEnumValueIndex tethering__multi_touch_msg__type__enum_values_by_name[6] =
+const ProtobufCEnumValueIndex tethering__multi_touch_msg__type__enum_values_by_name[7] =
 {
+  { "DISPLAY", 6 },
   { "MAX_COUNT", 3 },
   { "RESOLUTION", 5 },
   { "START_ANS", 1 },
@@ -1602,15 +1711,15 @@ const ProtobufCEnumDescriptor tethering__multi_touch_msg__type__descriptor =
   "Type",
   "Tethering__MultiTouchMsg__Type",
   "tethering",
-  6,
+  7,
   tethering__multi_touch_msg__type__enum_values_by_number,
-  6,
+  7,
   tethering__multi_touch_msg__type__enum_values_by_name,
   1,
   tethering__multi_touch_msg__type__value_ranges,
   NULL,NULL,NULL,NULL   /* reserved[1234] */
 };
-static const ProtobufCFieldDescriptor tethering__multi_touch_msg__field_descriptors[7] =
+static const ProtobufCFieldDescriptor tethering__multi_touch_msg__field_descriptors[8] =
 {
   {
     "type",
@@ -1696,8 +1805,21 @@ static const ProtobufCFieldDescriptor tethering__multi_touch_msg__field_descript
     0,            /* packed */
     0,NULL,NULL    /* reserved1,reserved2, etc */
   },
+  {
+    "display",
+    8,
+    PROTOBUF_C_LABEL_OPTIONAL,
+    PROTOBUF_C_TYPE_MESSAGE,
+    0,   /* quantifier_offset */
+    PROTOBUF_C_OFFSETOF(Tethering__MultiTouchMsg, display),
+    &tethering__display_msg__descriptor,
+    NULL,
+    0,            /* packed */
+    0,NULL,NULL    /* reserved1,reserved2, etc */
+  },
 };
 static const unsigned tethering__multi_touch_msg__field_indices_by_name[] = {
+  7,   /* field[7] = display */
   4,   /* field[4] = maxCount */
   6,   /* field[6] = resolution */
   2,   /* field[2] = startAns */
@@ -1709,7 +1831,7 @@ static const unsigned tethering__multi_touch_msg__field_indices_by_name[] = {
 static const ProtobufCIntRange tethering__multi_touch_msg__number_ranges[1 + 1] =
 {
   { 1, 0 },
-  { 0, 7 }
+  { 0, 8 }
 };
 const ProtobufCMessageDescriptor tethering__multi_touch_msg__descriptor =
 {
@@ -1719,7 +1841,7 @@ const ProtobufCMessageDescriptor tethering__multi_touch_msg__descriptor =
   "Tethering__MultiTouchMsg",
   "tethering",
   sizeof(Tethering__MultiTouchMsg),
-  7,
+  8,
   tethering__multi_touch_msg__field_descriptors,
   tethering__multi_touch_msg__field_indices_by_name,
   1,  tethering__multi_touch_msg__number_ranges,
index 8e551c02e9595b9b4ae05ce48a674cd1ac8b3f10..7b28c00a28ffd944e7ab3608d01d2157a6243767 100644 (file)
@@ -21,6 +21,7 @@ typedef struct _Tethering__SetSensorStatus Tethering__SetSensorStatus;
 typedef struct _Tethering__SensorData Tethering__SensorData;
 typedef struct _Tethering__SensorMsg Tethering__SensorMsg;
 typedef struct _Tethering__Resolution Tethering__Resolution;
+typedef struct _Tethering__DisplayMsg Tethering__DisplayMsg;
 typedef struct _Tethering__MultiTouchMaxCount Tethering__MultiTouchMaxCount;
 typedef struct _Tethering__MultiTouchData Tethering__MultiTouchData;
 typedef struct _Tethering__MultiTouchMsg Tethering__MultiTouchMsg;
@@ -48,7 +49,8 @@ typedef enum _Tethering__MultiTouchMsg__Type {
   TETHERING__MULTI_TOUCH_MSG__TYPE__TERMINATE = 4,
   TETHERING__MULTI_TOUCH_MSG__TYPE__MAX_COUNT = 5,
   TETHERING__MULTI_TOUCH_MSG__TYPE__TOUCH_DATA = 6,
-  TETHERING__MULTI_TOUCH_MSG__TYPE__RESOLUTION = 7
+  TETHERING__MULTI_TOUCH_MSG__TYPE__RESOLUTION = 7,
+  TETHERING__MULTI_TOUCH_MSG__TYPE__DISPLAY = 8
 } Tethering__MultiTouchMsg__Type;
 typedef enum _Tethering__TetheringMsg__Type {
   TETHERING__TETHERING_MSG__TYPE__HANDSHAKE_REQ = 2,
@@ -237,6 +239,20 @@ struct  _Tethering__Resolution
     , 0, 0 }
 
 
+struct  _Tethering__DisplayMsg
+{
+  ProtobufCMessage base;
+  protobuf_c_boolean onoff;
+  protobuf_c_boolean has_framerate;
+  int32_t framerate;
+  protobuf_c_boolean has_imagedata;
+  ProtobufCBinaryData imagedata;
+};
+#define TETHERING__DISPLAY_MSG__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&tethering__display_msg__descriptor) \
+    , 0, 0,0, 0,{0,NULL} }
+
+
 struct  _Tethering__MultiTouchMaxCount
 {
   ProtobufCMessage base;
@@ -275,10 +291,11 @@ struct  _Tethering__MultiTouchMsg
   Tethering__MultiTouchMaxCount *maxcount;
   Tethering__MultiTouchData *touchdata;
   Tethering__Resolution *resolution;
+  Tethering__DisplayMsg *display;
 };
 #define TETHERING__MULTI_TOUCH_MSG__INIT \
  { PROTOBUF_C_MESSAGE_INIT (&tethering__multi_touch_msg__descriptor) \
-    , 0, NULL, NULL, NULL, NULL, NULL, NULL }
+    , 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
 
 
 struct  _Tethering__TetheringMsg
@@ -545,6 +562,25 @@ Tethering__Resolution *
 void   tethering__resolution__free_unpacked
                      (Tethering__Resolution *message,
                       ProtobufCAllocator *allocator);
+/* Tethering__DisplayMsg methods */
+void   tethering__display_msg__init
+                     (Tethering__DisplayMsg         *message);
+size_t tethering__display_msg__get_packed_size
+                     (const Tethering__DisplayMsg   *message);
+size_t tethering__display_msg__pack
+                     (const Tethering__DisplayMsg   *message,
+                      uint8_t             *out);
+size_t tethering__display_msg__pack_to_buffer
+                     (const Tethering__DisplayMsg   *message,
+                      ProtobufCBuffer     *buffer);
+Tethering__DisplayMsg *
+       tethering__display_msg__unpack
+                     (ProtobufCAllocator  *allocator,
+                      size_t               len,
+                      const uint8_t       *data);
+void   tethering__display_msg__free_unpacked
+                     (Tethering__DisplayMsg *message,
+                      ProtobufCAllocator *allocator);
 /* Tethering__MultiTouchMaxCount methods */
 void   tethering__multi_touch_max_count__init
                      (Tethering__MultiTouchMaxCount         *message);
@@ -662,6 +698,9 @@ typedef void (*Tethering__SensorMsg_Closure)
 typedef void (*Tethering__Resolution_Closure)
                  (const Tethering__Resolution *message,
                   void *closure_data);
+typedef void (*Tethering__DisplayMsg_Closure)
+                 (const Tethering__DisplayMsg *message,
+                  void *closure_data);
 typedef void (*Tethering__MultiTouchMaxCount_Closure)
                  (const Tethering__MultiTouchMaxCount *message,
                   void *closure_data);
@@ -701,6 +740,7 @@ extern const ProtobufCMessageDescriptor tethering__sensor_data__descriptor;
 extern const ProtobufCMessageDescriptor tethering__sensor_msg__descriptor;
 extern const ProtobufCEnumDescriptor    tethering__sensor_msg__type__descriptor;
 extern const ProtobufCMessageDescriptor tethering__resolution__descriptor;
+extern const ProtobufCMessageDescriptor tethering__display_msg__descriptor;
 extern const ProtobufCMessageDescriptor tethering__multi_touch_max_count__descriptor;
 extern const ProtobufCMessageDescriptor tethering__multi_touch_data__descriptor;
 extern const ProtobufCMessageDescriptor tethering__multi_touch_msg__descriptor;
index cf08eee74c761f1801c3355e2534d17e04e1346d..9db3c38ad16dfe705b6fa11a1721bec2c30500e6 100644 (file)
@@ -123,6 +123,13 @@ message Resolution {
        required int32 height = 2;
 }
 
+message DisplayMsg {
+       // required Resolution resolution = 1;
+       required bool onOff = 2;
+       optional int32 frameRate = 3;
+       optional bytes imageData = 4;
+}
+
 message MultiTouchMaxCount {
        optional int32 max = 1 [default = 10];
 }
@@ -142,6 +149,7 @@ message MultiTouchMsg {
                MAX_COUNT = 5;
                TOUCH_DATA = 6;
                RESOLUTION = 7;
+               DISPLAY = 8;
        }
        required Type type = 1;
        optional StartReq startReq = 2;
@@ -150,6 +158,7 @@ message MultiTouchMsg {
        optional MultiTouchMaxCount maxCount = 5;
        optional MultiTouchData touchData = 6;
        optional Resolution resolution = 7;
+       optional DisplayMsg display = 8;
 }
 
 message TetheringMsg {