Moved timeout constants to appsettings in preparatino for adding to user configuratio...
[vlc-remote] / src / appsettings.h
index 98b287b..1da0b9a 100644 (file)
 #define APPSETTINGS_H
 #include <QSettings>
 
+#ifndef STATUS_POLL_TIMEOUT
+#define STATUS_POLL_TIMEOUT 5000
+#endif
+#ifndef PING_TIMEOUT
+#define PING_TIMEOUT 1000
+#endif
+#ifndef CONNECTION_TIMEOUT
+#define CONNECTION_TIMEOUT 1000
+#endif
+#ifndef RETRIEVE_ART_TIMEOUT
+#define RETRIEVE_ART_TIMEOUT 500
+#endif
+#ifndef RETRY_NETWORK_TIMEOUT
+#define RETRY_NETWORK_TIMEOUT 20000
+#endif
+
+#ifndef SHOW_UNKNOWN_FILETYPES
+#define SHOW_UNKNOWN_FILETYPES false
+#endif
+
+
 struct VlcDirectory {
     QString name;
     QString path;
@@ -43,8 +64,12 @@ public:
     static Orientation setOrientation(Orientation orientation);
     static Orientation getOrientation();
     static bool isConnected();
-//private:
-    //static QSettings settings;
+    static int getStatusPollTimeout();
+    static int getPingTimeout();
+    static int getConnectionTimeout();
+    static int getRetrieveArtTimeout();
+    static int getRetryNetworkTimeout();
+    static bool getShowUnknownFileTypes();
 };
 
 #endif // APPSETTINGS_H