EXIT = 11
} APPMenu;
- struct CloseApp {};
+ struct CloseApp
+ {
+ };
const int MAX_PATH = 2048;
void getCurrentPath(std::string *pPath)
{
- char buffer[MAX_PATH];
+ char buffer[MAX_PATH] = {0,};
if (!pPath->empty())
+ {
pPath->clear();
+ }
#if defined(__linux__)
char *strPath = NULL;
strPath = strrchr(buffer, '/');
if (strPath != NULL)
+ {
*strPath = '\0';
+ }
}
#endif
pPath->append(buffer);
int processUserInput(int min, int max)
{
- int input;
+ int input = 0;
std::cin >> input;
if (!std::cin.fail() && min <= input && input <= max)
+ {
return input;
+ }
std::cin.clear();
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
for (auto &bundle : bundleList)
{
if (bundle->getID().compare(bundleId) == 0)
+ {
return true;
+ }
}
}
for (auto &resource : resourceList)
{
if (resource.compare(resourceUri) == 0)
+ {
return true;
+ }
}
}
{
g_pResourceContainer->startContainer(configPath);
g_bContainerStarted = true;
+ std::cout << "Container started." << std::endl;
}
else
{
g_bSampleBundleStarted = false;
}
else
+ {
std::cout << "Sample Bundle is not started." << std::endl;
+ }
}
else
{
if (g_pResourceContainer && g_bContainerStarted)
{
if (checkBundleRegistered(EXAMPLE_BUNDLE_ID))
+ {
g_pResourceContainer->removeBundle(EXAMPLE_BUNDLE_ID);
+ }
}
else
{
resourceParams);
}
else
+ {
std::cout << "Sample Bundle is not started." << std::endl;
+ }
}
else
{
{
if (checkResourceRegistered(EXAMPLE_BUNDLE_ID, EXAMPLE_RESOURCE_URI)
&& g_bSampleBundleStarted)
+ {
g_pResourceContainer->removeResourceConfig(EXAMPLE_BUNDLE_ID, EXAMPLE_RESOURCE_URI);
+ }
else
+ {
std::cout << "Sample Bundle is not started." << std::endl;
+ }
}
else
{
}
if (g_bContainerStarted)
+ {
g_pResourceContainer->stopContainer();
+ }
g_pResourceContainer = nullptr;