[DEV] add get application name API

This commit is contained in:
Edouard DUPIN 2015-06-01 21:48:34 +02:00
parent 500e2ebfd6
commit b02a75a7b8
4 changed files with 22 additions and 1 deletions

View File

@ -112,3 +112,7 @@ void etk::init(int _argc, const char** _argv) {
}
TK_INFO("E-TK system init (END)");
}
std::string etk::getApplicationName() {
return etk::FSNodeGetApplicationName();
}

View File

@ -9,6 +9,8 @@
#ifndef __ETK_H__
#define __ETK_H__
#include <string>
namespace etk {
/**
* @brief Initialize etk
@ -16,6 +18,12 @@ namespace etk {
* @param[in] _argv List of arguments
*/
void init(int _argc, const char** _argv);
/**
* @brief Get application name.
* @return The application name
*/
std::string getApplicationName();
}
#endif

View File

@ -150,6 +150,9 @@ static std::string baseRunPathInHome = "/";
static std::string baseFolderCache = "~/.tmp/cache/"; // Temporary data (can be removed the next time)
#endif
std::string etk::FSNodeGetApplicationName() {
return baseApplName;
}
#ifdef __TARGET_OS__Android
static etk::Archive* s_APKArchive = nullptr;

View File

@ -25,6 +25,12 @@ namespace etk {
namespace etk {
void setArgZero(const std::string& _val);
std::string simplifyPath(std::string _input);
/**
* @brief Get application name.
* @return The application name
*/
std::string FSNodeGetApplicationName();
/**
* List of Type that a node can have (this wrap some type that not exist on Windows)
*/