summaryrefslogtreecommitdiff
path: root/setup.cpp
diff options
context:
space:
mode:
authorSascha Volkenandt <sascha (at) akv-soft (dot) de>2007-01-02 19:18:27 +0000
committerSascha Volkenandt <sascha (at) akv-soft (dot) de>2007-01-02 19:18:27 +0000
commit48c46dfdd986ad4a7a0692d05992f7882bef6a88 (patch)
tree88a3a88a7ab43632850569cba3ab48a1924d9e52 /setup.cpp
downloadvdr-plugin-live-48c46dfdd986ad4a7a0692d05992f7882bef6a88.tar.gz
vdr-plugin-live-48c46dfdd986ad4a7a0692d05992f7882bef6a88.tar.bz2
- initial checkin
Diffstat (limited to 'setup.cpp')
-rw-r--r--setup.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/setup.cpp b/setup.cpp
new file mode 100644
index 0000000..ab518dc
--- /dev/null
+++ b/setup.cpp
@@ -0,0 +1,33 @@
+#include <getopt.h>
+#include "setup.h"
+
+namespace vdrlive {
+
+Setup::Setup()
+{
+}
+
+bool Setup::Parse( int argc, char* argv[] )
+{
+ static struct option opts[] = {
+ { "lib", required_argument, NULL, 'L' },
+ { 0 }
+ };
+
+ int optchar, optind = 0;
+ while ( ( optchar = getopt_long( argc, argv, "L:", opts, &optind ) ) != -1 ) {
+ switch ( optchar ) {
+ case 'L': m_libraryPath = optarg; break;
+ default: return false;
+ }
+ }
+ return true;
+}
+
+Setup& Setup::Get()
+{
+ static Setup instance;
+ return instance;
+}
+
+} // namespace vdrlive