@blog.justoneplanet.info

日々勉強

TizenでUUIDを取得する

void
UUIDManager::Get(String &uuid) {
	result r = E_SUCCESS;
	String keyUUID("key_uuid");
	AppRegistry* appRegistry = Application::GetInstance()->GetAppRegistry();
	r = appRegistry->Get(keyUUID, uuid);
	if (r == E_KEY_NOT_FOUND) {
		String u;
		Tizen::Base::UuId* pUUID = Tizen::Base::UuId::GenerateN();
		u.Append(pUUID->ToString().GetPointer());
		appRegistry->Add(keyUUID, u);
		delete pUUID, pUUID = NULL;
	}
	r = appRegistry->Get(keyUUID, uuid);
}

コメントはまだありません»

No comments yet.

RSS feed for comments on this post.TrackBack URL

Leave a comment