[gupnp-tools/wip/search: 25/33] av-cp: Use constant for slice



commit 94da81655130c160a5e82b05a62b67ae7805e12c
Author: Jens Georg <mail jensge org>
Date:   Thu Aug 18 19:59:58 2016 +0200

    av-cp: Use constant for slice
    
    And explain why we chose 30 there.
    
    Signed-off-by: Jens Georg <mail jensge org>

 src/av-cp/search-dialog.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/av-cp/search-dialog.c b/src/av-cp/search-dialog.c
index d67f70e..5805913 100644
--- a/src/av-cp/search-dialog.c
+++ b/src/av-cp/search-dialog.c
@@ -27,6 +27,13 @@
 #include "server-device.h"
 #include "icons.h"
 
+/* DLNA recommends something between 10 and 30, let's just use 30
+ * cf. 7.4.1.4.10.9 in the 2014 version of the architecture and protocols
+ * guideline
+ * dlna-guidelines-march-2014---part-1-1-architectures-and-protocols.pdf
+ */
+#define SEARCH_DIALOG_DEFAULT_SLICE 30
+
 typedef struct _SearchTask SearchTask;
 
 struct _SearchDialog {
@@ -530,7 +537,7 @@ search_dialog_on_search_activate (SearchDialog *self, GtkEntry *entry)
                                               priv->search_dialog_liststore,
                                               priv->id,
                                               gtk_entry_get_text (entry),
-                                              30,
+                                              SEARCH_DIALOG_DEFAULT_SLICE,
                                               search_dialog_on_search_task_done,
                                               self);
                 search_task_run (priv->task);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]