+#ifndef __VLP_CONFIGURATIONFINDER_H
+#define __VLP_CONFIGURATIONFINDER_H
+
+#include <string>
+#include <vector>
+
+#include "config.h"
+
+/**
+ * @file
+ * @brief Configuration file finding utilities
+ * @author Rafał Długołęcki
+ */
+
+namespace loglan {
+namespace vlp {
+
+#if defined(WIN32) || defined(_WIN32)
+# define VLP_CONFIG_PATH_SEPARATOR "\\"
+#else
+# define VLP_CONFIG_PATH_SEPARATOR "/"
+#endif
+
+class ConfigurationFinder {
+private:
+ std::vector<std::string> searchDirs;
+
+ /**
+ * Adds directory to the list of search directories
+ */
+ void addSearchDir(std::string dir);
+public:
+ /**
+ * Default name of configuration file
+ */
+ static const constexpr char * DEFAULT_CONFIG_FILENAME = "vlp.cfg";
+
+ ConfigurationFinder();
+
+ /**
+ * Initializes list of search directories
+ */
+ void initSearchDirs();
+
+ /**
+ * Finds config file in possible config directories
+ *
+ * Search is made in following steps:
+ * 1. Check existence of filename in current execution path dir
+ * 2. If not found, check in user home directory, e.g:
+ * - C:/Documents and Settings/Username
+ * - ~/
+ * 3. If not found, check in system config directory (build dependent),
+ * e.g.:
+ * - /usr/local/etc/loglan/
+ * - /etc/loglan/
+ *
+ * @param filename name of the file to search for
+ * @return path to the filename
+ *
+ */
+ std::string findConfig(std::string filename = DEFAULT_CONFIG_FILENAME);
+
+ /**
+ * Gets path to user local settings directory
+ *
+ * @return directory of user settings
+ */
+ virtual std::string getUserConfigurationDir() = 0;
+
+ /**
+ * Gets path to system-wide settings directory
+ *
+ * @return directory of user settings
+ */
+ std::string getSystemConfigurationDir();
+};
+
+}
+}
+
+
+#endif /* __VLP_CONFIGURATIONFINDER_H */
\ No newline at end of file