* The following example demonstrates how to use the %ContentManager class.
*
* @code
+ * #include <FApp.h>
+ * #include <FBase.h>
+ * #include <FContent.h>
+ * #include <FSystem.h>
+ *
+ * using namespace Tizen::Content;
+ *
* result
* MyClass::TestContentManager(void)
* {
- * result r = E_SUCCESS;
- * ContentId contentId;
* ContentManager contentManager;
- * r = contentManager.Construct();
- * TryReturn(!IsFailed(r), r, "Construct failed.");
+ * result r = contentManager.Construct();
*
- * // Creates
+ * // Creates Content
* ImageContentInfo imageContentInfo;
* r = imageContentInfo.Construct(null);
- * TryReturn(!IsFailed(r), r, "Construct failed.");
*
* r = imageContentInfo.SetKeyword(L"platform, tizen");
- * if (IsFailed(r))
- * {
- * return r;
- * }
- *
* r = imageContentInfo.SetLocationTag(L"seoul");
- * if (IsFailed(r))
- * {
- * return r;
- * }
*
* Tizen::Base::String sourcePath = Tizen::App::App::GetInstance()->GetAppRootPath() + L"data/flower.jpg";
* Tizen::Base::String destPath = Tizen::System::Environment::GetMediaPath() + L"Images/flower.jpg";
*
- * contentId = contentManager.CreateContent(sourcePath, destPath, false, &imageContentInfo);
- * TryReturn(Tizen::Base::UuId::GetInvalidUuId() != contentId, GetLastResult(), "CreateContent failed.");
+ * ContentId contentId = contentManager.CreateContent(sourcePath, destPath, false, &imageContentInfo);
+ * r = GetLastResult();
*
- * // Gets
- * ImageContentInfo* pImageContentInfo = null;
- * pImageContentInfo = dynamic_cast<ImageContentInfo*>(contentManager.GetContentInfoN(contentId));
- * TryReturn(pImageContentInfo != null, GetLastResult(), "GetContentInfoN failed.");
+ * // Gets Content
+ * ImageContentInfo* pImageContentInfo = dynamic_cast< ImageContentInfo* >(contentManager.GetContentInfoN(contentId));
+ * r = GetLastResult();
*
* pImageContentInfo->GetContentPath();
*
- * // Updates
+ * // Updates Content
* r = pImageContentInfo->SetKeyword(L"apple, fruit");
- * if (IsFailed(r))
- * {
- * delete pImageContentInfo;
- * return r;
- * }
* r = pImageContentInfo->SetProvider(L"kw1128");
- * if (IsFailed(r))
- * {
- * delete pImageContentInfo;
- * return r;
- * }
* r = contentManager.UpdateContent(*pImageContentInfo);
- * if (IsFailed(r))
- * {
- * delete pImageContentInfo;
- * return r;
- * }
*
- * // Deletes
+ * // Deletes Content
* r = contentManager.DeleteContent(contentId);
- * if (IsFailed(r))
- * {
- * delete pImageContentInfo;
- * return r;
- * }
*
* delete pImageContentInfo;
- * return r;
+ * return r;
* }
* @endcode
*/