diff options
Diffstat (limited to 'misc/search.h')
-rw-r--r-- | misc/search.h | 76 |
1 files changed, 71 insertions, 5 deletions
diff --git a/misc/search.h b/misc/search.h index df2442e..ef162b1 100644 --- a/misc/search.h +++ b/misc/search.h @@ -12,13 +12,27 @@ #include <vdr/tools.h> #include "util.h" +/** + * Sort criteria + * + * This is a structure for sorting objects. It has a certain property and + * a direction flag. + */ struct cSortCrit : public cListObject { - const char* Property; - bool SortDescending; + const char* Property; ///< the Property, which shall be sorted + bool SortDescending; ///< sort the objects in descending order }; typedef std::map<const char*, const char*, strCmp> propertyMap; +/** + * Web path parser + * + * Parses paths which came from the webserver. It splits the path into + * a section, a certain method and its properties. + * + * This can be used to easily determine which file was requested by a client + */ class cPathParser { private: cString mKey; @@ -33,9 +47,30 @@ private: cPathParser(); public: virtual ~cPathParser(); - static bool parse(const char* Path, int* Section, int* Method, propertyMap* Properties); + /** + * Parses the path + * + * This will parse the path and stores the result in the pointers given. + * + * @return returns + * - \bc true, if the parsing was successful + * - \bc false, otherwise + */ + static bool parse( + const char* Path, ///< the path which is parsed + int* Section, ///< the number of the registered section + int* Method, ///< the number of the registered method + propertyMap* Properties ///< the properties found in the path + ); }; +/** + * Creates a list with sort criteria + * + * This parser creates a list of sort criteria. It parses the sort criteria string + * from a \em Browse or \em Search request and stores the information in a \c cSortCrit + * structure. + */ class cSortCriteria { private: cSortCrit* mCurrentCrit; @@ -47,9 +82,26 @@ private: cSortCriteria(); public: virtual ~cSortCriteria(); - static cList<cSortCrit>* parse(const char* Sort); + /** + * Parses the sort criteria + * + * This parses the sort criteria and returns a list with valid criterias + * + * @return returns + * - a list with valid sort criterias + * - \bc null, otherwise + */ + static cList<cSortCrit>* parse( + const char* Sort ///< the string container the sort criteria + ); }; +/** + * Parses the filter criteria + * + * This parses the filter criteria which comes from a \em Browse or \em Search + * request. + */ class cFilterCriteria { private: cStringList* mFilterList; @@ -60,9 +112,23 @@ private: cStringList* getFilterList() const { return this->mFilterList; } public: virtual ~cFilterCriteria(); - static cStringList* parse(const char* Filter); + /** + * Parses the filter criteria + * + * This parses the filter criteria. It may be a empty string list, a \bc NULL + * pointer or a list with properties which shall be shown in the \em DIDL-Lite fragment. + * + * @return the stringlist containing the filter + */ + static cStringList* parse( + const char* Filter ///< the filter string + ); }; +/** + * @private + * @todo This is implemented very soon + */ class cSearch { private: char* SQLWhereStmt; |