Esempio n. 1
0
int BookMarkManager::AddCategory(Tizen::Base::String const & sName) const
{
  if (!sName.IsEmpty())
  {
    Framework * pFW = GetFramework();
    int i = pFW->AddCategory(FromTizenString(sName));
    pFW->GetBmCategory(i)->SaveToKMLFile();
    return i;
  }
  return -1;
}
string FileUtilsTizen::getWritablePath()
{
    UiApp* pApp = UiApp::GetInstance();
    if (!pApp)
    {
        return null;
    }

    string path("");
    AsciiEncoding ascii;
    Tizen::Base::String dataPath = pApp->GetAppDataPath();
    if (!dataPath.IsEmpty())
    {
        ByteBuffer* buffer = ascii.GetBytesN(dataPath);
        path.append((const char*)buffer->GetPointer());
        delete buffer;
    }

    return path;
}
bool FileUtilsTizen::init()
{
    UiApp* pApp = UiApp::GetInstance();
    if (!pApp)
    {
        return false;
    }

    Tizen::Base::String resPath = pApp->GetAppResourcePath();
    if (resPath.IsEmpty())
    {
        return false;
    }

    AsciiEncoding ascii;
    ByteBuffer* buffer = ascii.GetBytesN(resPath);
    _defaultResRootPath = (const char *)buffer->GetPointer();
    delete buffer;
    return FileUtils::init();
}