Bada 때 Osp::Content::ContentSeach 라는 class가 해당 class가 Tizen:: 으로 만 바뀌고, 기존의 기능을 대부분 지원 하는 것 같습니다. |
Contents searching 수행 code 입니다.
bool ContentsList::Initialize( Tizen::Ui::Controls::IconList &IconList,Tizen::Base::String & contentsPath)
{
int totalPage=0,totalCount =0;
result rSearch;
Tizen::Content::ContentSearch search;
rSearch = search.Construct(Tizen::Content::CONTENT_TYPE_IMAGE);
Tizen::Base::Collection::IList* pContentInfoList = search.SearchN(1,5,totalPage,totalCount);
if(IsFailed(GetLastResult()))
{
return false;
}
Tizen::Content::ContentSearchResult *pResult=null;
Tizen::Graphics::Bitmap* pThumbImg = null;
for(int i=0;i < pContentInfoList->GetCount();i++)
{
pResult = (Tizen::Content::ContentSearchResult*)pContentInfoList->GetAt(i);
if(pResult)
{
pThumbImg = pResult->GetContentInfo()->GetThumbnailN();
if(pThumbImg==null)
{
pResult->GetContentInfo()->MakeThumbnail(pResult->GetContentInfo()->GetContentPath());
pThumbImg = pResult->GetContentInfo()->GetThumbnailN();
if(pThumbImg ==null) continue;
}
IconList.AddItem( null, pThumbImg,pThumbImg);
delete pThumbImg;
}
}
pContentInfoList->RemoveAll(true);
delete pContentInfoList;
return true;
}
-
Bada Platform 내의 resource들에 대한 사용권한을 설정하는 것입니다.
이는 application 제작시 manifest.xml 에 포함을 시키고, 이를 통해 setting이 됩니다.
그럼 왜 Phone 내의 resource들에 대해 이런 복잡한 절차를 거치도록 되어있는가?
추측하기에 이는 사생활 보호와 사용자 보호를 위한 내용이라 볼 수 있습니다.
우선 manifest에 등록이 되어있어야 resource를 사용할 수 있기 때문에, 개발자가 사용자 몰래 특정 리소스를 사용하는 것을
방지하게 됩니다. 예를 들면 image viewer라는 프로그램을 짜는데 Call 기능은 아마도 거의 필요치 않을 것입니다.
그런데 이를 privilege에 등록 한다면, 뭔가 의심을 해볼 수 있으리라 생각됩니다.
또는 app스토어에서 분류목적으로도 사용할 수 도 있다고 생각됩니다.
그렇다 치고, 결국 manifest.xml 에 등록 안된 모듈을 사용할경우 시스템이 E_PRIVILEGE_DENIED 라는 에러를 발생시키게 됩니다.
이는 developer.bada.com 에 My Applications 에 가보면,
Step1. Generate your application profile 에 Generate a New Application Profile 을 보실 수 있을 것입니다.
이 application Generation 과정을 거치고 나면, 내가 개발하려고 하는 어플리케이션의 최종 manifest.xml 을 다운 받을 수 있습니다.
// Step2: Retrieve the category list IList* pValueList = contentSearch.GetValueListN(L"Category"); if (IsFailed(GetLastResult())) return r; String* pCategory = (String*)pValueList->GetAt(0); // Step3: Make a SQL where clause String whereExpr = L"Category='"; whereExpr.Append(*pCategory); whereExpr.Append(L"'");
|
Columnname |
Type |
Description |
|
ContentType |
String |
Content type (CONTENT_TYPE_IMAGE, CONTENT_TYPE_AUDIO, CONTENT_TYPE_VIDEO,CONTENT_TYPE_OTHER) To search for all types of content, use CONTENT_TYPE_ALL. |
|
ContentFileName |
String |
Content file name |
|
ContentName |
String |
User-defined content name |
|
ContentSize |
Longlong |
Content size (bytes) |
|
Category |
String |
Name used to group content using logical categorization,such as “Casual games” or “Action games” |
|
Author |
String |
Content creator |
|
DateTime |
Datetime |
Content creation time TheToString()method of Osp::Base::DateTimeis used when it is provided as the search condition. The DateTimerange begins from “01/01/1970 00:00:00”. |
|
Keyword |
String |
User‟s tags |
|
Provider |
String |
Content provider |
|
Rating |
String |
Rating information |
|
LocationTag |
String |
Locationtag, such as “Coex” or “Starbucks” |
|
Latitude |
Double |
Coordinates of latitude |
|
Longitude |
Double |
Coordinates of longitude |
|
Altitude |
Double |
Coordinates of altitude |
|
Title |
String |
Audio or video title |
|
Artist |
String |
Audio or video artist |
|
Genre |
String |
Audio or video genre |
|
Composer |
String |
Audio composer |
|
ReleaseYear |
Int |
Audio release year |
|
Album |
String |
Content album |
'tizen' 카테고리의 다른 글
| EFL: event flow control (이벤트 흐름 제어) (0) | 2016.08.25 |
|---|---|
| CLI (Command Line Inteface) 를 이용한 build (0) | 2015.11.30 |
| tpk install, 설치 (0) | 2014.05.28 |