summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/IO/IO.layout21
-rw-r--r--libs/IO/include/FileRepresentation.h12
-rw-r--r--libs/IO/src/File.cc24
-rw-r--r--libs/IO/src/FileRepresentation.cc12
-rw-r--r--libs/fsScan/fsScan.layout18
-rw-r--r--libs/networking/networking.layout28
-rw-r--r--libs/util/util.layout32
-rw-r--r--libs/vdr/vdr.layout28
8 files changed, 88 insertions, 87 deletions
diff --git a/libs/IO/IO.layout b/libs/IO/IO.layout
index f0b6b2a..0e6cd97 100644
--- a/libs/IO/IO.layout
+++ b/libs/IO/IO.layout
@@ -1,14 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Debug" />
- <File name="src/ConfigReader.cc" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="src/File.cc" open="1" top="1" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="459" topLine="0" />
+ <Cursor1 position="1130" topLine="0" />
</Cursor>
</File>
- <File name="src/File.cc" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="include/File.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="1638" topLine="30" />
+ <Cursor1 position="0" topLine="0" />
+ </Cursor>
+ </File>
+ <File name="include/ConfigReader.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor>
+ <Cursor1 position="475" topLine="0" />
</Cursor>
</File>
<File name="src/FileReader.cc" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -21,14 +26,14 @@
<Cursor1 position="1846" topLine="0" />
</Cursor>
</File>
- <File name="include/ConfigReader.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="src/LineReader.cc" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="475" topLine="0" />
+ <Cursor1 position="854" topLine="0" />
</Cursor>
</File>
- <File name="src/LineReader.cc" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="src/ConfigReader.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="854" topLine="0" />
+ <Cursor1 position="459" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>
diff --git a/libs/IO/include/FileRepresentation.h b/libs/IO/include/FileRepresentation.h
index 2c2db5a..8bc9d9b 100644
--- a/libs/IO/include/FileRepresentation.h
+++ b/libs/IO/include/FileRepresentation.h
@@ -1,25 +1,25 @@
/**
* ======================== legal notice ======================
- *
+ *
* File: FileRepresentation.h
* Created: 21. Juli 2012, 12
* Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
* Project: libIO: classes for files, filesystem and input/output
- *
+ *
* CMP - compound media player
- *
+ *
* is a client/server mediaplayer intended to play any media from any workstation
* without the need to export or mount shares. cmps is an easy to use backend
* with a (ready to use) HTML-interface. Additionally the backend supports
* authentication via HTTP-digest authorization.
* cmpc is a client with vdr-like osd-menues.
- *
+ *
* Copyright (c) 2012 Reinhard Mantey, some rights reserved!
* published under Creative Commons by-sa
* For details see http://creativecommons.org/licenses/by-sa/3.0/
- *
+ *
* The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp
- *
+ *
* --------------------------------------------------------------
*/
#ifndef FILEREPRESENTATION_H
diff --git a/libs/IO/src/File.cc b/libs/IO/src/File.cc
index 6770ec8..9b92b55 100644
--- a/libs/IO/src/File.cc
+++ b/libs/IO/src/File.cc
@@ -1,25 +1,25 @@
/**
* ======================== legal notice ======================
- *
+ *
* File: File.cc
* Created: 21. Juli 2012, 12
* Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
* Project: libIO: classes for files, filesystem and input/output
- *
+ *
* CMP - compound media player
- *
+ *
* is a client/server mediaplayer intended to play any media from any workstation
* without the need to export or mount shares. cmps is an easy to use backend
* with a (ready to use) HTML-interface. Additionally the backend supports
* authentication via HTTP-digest authorization.
* cmpc is a client with vdr-like osd-menues.
- *
+ *
* Copyright (c) 2012 Reinhard Mantey, some rights reserved!
* published under Creative Commons by-sa
* For details see http://creativecommons.org/licenses/by-sa/3.0/
- *
+ *
* The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp
- *
+ *
* --------------------------------------------------------------
*/
#include <File.h>
@@ -30,10 +30,6 @@
#include <sys/dir.h>
cFileSystem *cFile::fs = NULL;
-static mode_t ReadMask = S_IRUSR | S_IRGRP | S_IROTH;
-static mode_t WriteMask = S_IWUSR | S_IWGRP | S_IWOTH;
-static mode_t ExecMask = S_IXUSR | S_IXGRP | S_IXOTH;
-
cFile::cFile(const char *Path)
: rep(NULL)
@@ -109,19 +105,19 @@ bool cFile::IsSymbolic(void) const
bool cFile::CanRead(void) const
{
- if (rep) return rep->mode & ReadMask;
+ if (rep) return access(rep->Path(), R_OK) == 0;
return false;
}
bool cFile::CanWrite(void) const
{
- if (rep) return rep->mode & WriteMask;
+ if (rep) return access(rep->Path(), W_OK) == 0;
return false;
}
bool cFile::CanExecute(void) const
{
- if (rep) return rep->mode & ExecMask;
+ if (rep) return access(rep->Path(), X_OK) == 0;
return false;
}
@@ -159,7 +155,7 @@ void cFile::Cleanup(void)
void cFile::VisitFiles(int (*cb)(void *, cFile *, const char *), void *opaque)
{
- if (!Exists() || !IsDirectory()) return;
+ if (!Exists() || !IsDirectory() || !CanExecute()) return;
const char *path = AbsolutePath();
if (!path) return;
diff --git a/libs/IO/src/FileRepresentation.cc b/libs/IO/src/FileRepresentation.cc
index f74d2c8..3366157 100644
--- a/libs/IO/src/FileRepresentation.cc
+++ b/libs/IO/src/FileRepresentation.cc
@@ -1,25 +1,25 @@
/**
* ======================== legal notice ======================
- *
+ *
* File: FileRepresentation.cc
* Created: 21. Juli 2012, 12
* Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
* Project: libIO: classes for files, filesystem and input/output
- *
+ *
* CMP - compound media player
- *
+ *
* is a client/server mediaplayer intended to play any media from any workstation
* without the need to export or mount shares. cmps is an easy to use backend
* with a (ready to use) HTML-interface. Additionally the backend supports
* authentication via HTTP-digest authorization.
* cmpc is a client with vdr-like osd-menues.
- *
+ *
* Copyright (c) 2012 Reinhard Mantey, some rights reserved!
* published under Creative Commons by-sa
* For details see http://creativecommons.org/licenses/by-sa/3.0/
- *
+ *
* The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp
- *
+ *
* --------------------------------------------------------------
*/
#include <FileRepresentation.h>
diff --git a/libs/fsScan/fsScan.layout b/libs/fsScan/fsScan.layout
index 2db2bda..066b040 100644
--- a/libs/fsScan/fsScan.layout
+++ b/libs/fsScan/fsScan.layout
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Debug" />
+ <File name="src/VdrRecording.cc" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor>
+ <Cursor1 position="1404" topLine="0" />
+ </Cursor>
+ </File>
<File name="src/AbstractMedia.cc" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1453" topLine="0" />
@@ -16,19 +21,14 @@
<Cursor1 position="1450" topLine="0" />
</Cursor>
</File>
- <File name="include/MediaFactory.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor>
- <Cursor1 position="1670" topLine="0" />
- </Cursor>
- </File>
- <File name="src/VdrRecording.cc" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="include/AbstractMedia.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="1404" topLine="0" />
+ <Cursor1 position="1008" topLine="0" />
</Cursor>
</File>
- <File name="include/AbstractMedia.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="include/MediaFactory.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="1008" topLine="0" />
+ <Cursor1 position="1670" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>
diff --git a/libs/networking/networking.layout b/libs/networking/networking.layout
index d908ef8..8ed81c4 100644
--- a/libs/networking/networking.layout
+++ b/libs/networking/networking.layout
@@ -1,54 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Debug" />
- <File name="src/ConnectionHandler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="src/ServerConfig.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="1551" topLine="0" />
+ <Cursor1 position="1670" topLine="0" />
</Cursor>
</File>
- <File name="include/ConnectionPoint.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="src/HTTPMessage.cc" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
- <File name="src/ConnectionPoint.cc" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="include/HTTPResponse.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
- <File name="src/HTTPFileResponse.cc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="include/ConnectionHandler.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
- <File name="include/HTTPMessage.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="src/ConnectionPoint.cc" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
- <File name="include/ConnectionHandler.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="include/HTTPMessage.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
- <File name="src/HTTPMessage.cc" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="src/ConnectionHandler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="0" topLine="0" />
+ <Cursor1 position="1551" topLine="0" />
</Cursor>
</File>
- <File name="include/ServerConfig.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="include/ConnectionPoint.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="1684" topLine="0" />
+ <Cursor1 position="0" topLine="0" />
</Cursor>
</File>
- <File name="include/HTTPResponse.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="src/HTTPFileResponse.cc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
- <File name="src/ServerConfig.cc" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="include/ServerConfig.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="1670" topLine="0" />
+ <Cursor1 position="1684" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>
diff --git a/libs/util/util.layout b/libs/util/util.layout
index ef999ec..7fa0f25 100644
--- a/libs/util/util.layout
+++ b/libs/util/util.layout
@@ -1,14 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Debug" />
- <File name="src/AbstractListAssembler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor>
- <Cursor1 position="0" topLine="0" />
- </Cursor>
- </File>
- <File name="include/Codec.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="src/JSonWriter.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="1385" topLine="0" />
+ <Cursor1 position="1655" topLine="3" />
</Cursor>
</File>
<File name="include/ManagedMap.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -16,11 +11,6 @@
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
- <File name="src/StringBuilder.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor>
- <Cursor1 position="1953" topLine="59" />
- </Cursor>
- </File>
<File name="src/Codec.cc" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1327" topLine="0" />
@@ -36,19 +26,29 @@
<Cursor1 position="1959" topLine="0" />
</Cursor>
</File>
+ <File name="src/StringBuilder.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor>
+ <Cursor1 position="1953" topLine="59" />
+ </Cursor>
+ </File>
+ <File name="include/JSonWriter.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor>
+ <Cursor1 position="1532" topLine="0" />
+ </Cursor>
+ </File>
<File name="src/ManagedMap.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
- <File name="src/JSonWriter.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="include/Codec.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="1655" topLine="3" />
+ <Cursor1 position="1385" topLine="0" />
</Cursor>
</File>
- <File name="include/JSonWriter.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="src/AbstractListAssembler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="1532" topLine="0" />
+ <Cursor1 position="0" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>
diff --git a/libs/vdr/vdr.layout b/libs/vdr/vdr.layout
index a8d4974..1c3d5a2 100644
--- a/libs/vdr/vdr.layout
+++ b/libs/vdr/vdr.layout
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Debug" />
- <File name="src/TimeMs.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="include/CharsetConv.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="2160" topLine="0" />
+ <Cursor1 position="5244" topLine="0" />
</Cursor>
</File>
<File name="include/Logging.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@@ -11,34 +11,34 @@
<Cursor1 position="1690" topLine="0" />
</Cursor>
</File>
- <File name="src/CharsetConv.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="src/Thread.cc" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="3680" topLine="57" />
+ <Cursor1 position="0" topLine="0" />
</Cursor>
</File>
- <File name="src/i18n.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="src/CharsetConv.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="0" topLine="0" />
+ <Cursor1 position="3680" topLine="57" />
</Cursor>
</File>
- <File name="include/Thread.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="src/Logging.cc" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="0" topLine="0" />
+ <Cursor1 position="1283" topLine="0" />
</Cursor>
</File>
- <File name="src/Thread.cc" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="src/TimeMs.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="0" topLine="0" />
+ <Cursor1 position="2160" topLine="0" />
</Cursor>
</File>
- <File name="include/CharsetConv.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="include/Thread.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="5244" topLine="0" />
+ <Cursor1 position="0" topLine="0" />
</Cursor>
</File>
- <File name="src/Logging.cc" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="src/i18n.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
- <Cursor1 position="1283" topLine="0" />
+ <Cursor1 position="0" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>