libqi-api  2.0.6.8
/home/opennao/work/master/sdk/libqi/qi/path.hpp
Go to the documentation of this file.
00001 #pragma once
00002 /*
00003  * Copyright (c) 2012 Aldebaran Robotics. All rights reserved.
00004  * Use of this source code is governed by a BSD-style license that can be
00005  * found in the COPYING file.
00006  */
00007 
00012 #ifndef _QI_PATH_HPP_
00013 #define _QI_PATH_HPP_
00014 
00015 # include <string>
00016 # include <vector>
00017 # include <qi/api.hpp>
00018 
00019 namespace qi
00020 {
00022   namespace path
00023   {
00024 
00026     QI_API std::string sdkPrefix();
00027 
00028     // not thread-safe, must be kept internal
00029     namespace detail {
00030 
00035       QI_API std::vector<std::string> getSdkPrefixes();
00036 
00046       QI_API void addOptionalSdkPrefix(const char* prefix);
00047 
00054       QI_API void clearOptionalSdkPrefix();
00055 
00056     }
00057 
00059     QI_API std::string findBin(const std::string& name);
00060 
00062     QI_API std::string findLib(const std::string& name);
00063 
00065     QI_API std::string findConf(const std::string& applicationName,
00066                                 const std::string& filename);
00067 
00070     QI_API std::string findData(const std::string& applicationName,
00071                                 const std::string& filename);
00072 
00077     QI_API std::vector<std::string> listData(const std::string& applicationName,
00078                                              const std::string& pattern="*");
00079 
00081     QI_API std::vector<std::string> confPaths(const std::string& applicationName="");
00082 
00084     QI_API std::vector<std::string> dataPaths(const std::string& applicationName="");
00085 
00087     QI_API std::vector<std::string> binPaths();
00088 
00090     QI_API std::vector<std::string> libPaths();
00091 
00092 
00094     QI_API void setWritablePath(const std::string &path);
00095 
00097     QI_API std::string userWritableDataPath(const std::string& applicationName,
00098                                             const std::string& filename);
00099 
00101     QI_API std::string userWritableConfPath(const std::string& applicationName,
00102                                             const std::string& filename="");
00103 
00112     QI_API std::string convertToDosPath(const std::string &pathString);
00113   }
00114 }
00115 
00116 #endif  // _QI_PATH_HPP_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines