From fe4f5c34f781f5890894a8a1a68de617fb4482dd Mon Sep 17 00:00:00 2001 From: rahul varna Date: Thu, 11 Apr 2013 17:41:06 +0900 Subject: [PATCH] Resource ID header addition Signed-off-by: rahul varna --- project/inc/AppResourceId.h | 55 ++++++++++++++++++++++++++ project/src/AppResourceId.cpp | 53 +++++++++++++++++++++++++ project/src/Audio/AudioEqualizerForm.cpp | 3 +- project/src/Audio/AudioInOut.cpp | 3 +- project/src/Audio/TonePlayerForm.cpp | 3 +- project/src/Camera/CameraCaptureForm.cpp | 3 +- project/src/Codec/AudioDecoderForm.cpp | 3 +- project/src/Codec/AudioEncoderForm.cpp | 3 +- project/src/Codec/VideoDecoderForm.cpp | 6 +-- project/src/Codec/VideoEncoderForm.cpp | 3 +- project/src/Codec/VideoFrameExtractorForm.cpp | 3 +- project/src/Image/GifDecoderForm.cpp | 3 +- project/src/Image/ImageColorConvertForm.cpp | 3 +- project/src/Image/ImageConverterForm.cpp | 3 +- project/src/Image/ImageFlipRotateForm.cpp | 3 +- project/src/Image/ImageResizeForm.cpp | 3 +- project/src/Image/ImageViewerForm.cpp | 3 +- project/src/Player/CameraPlayerForm.cpp | 3 +- project/src/Player/CaptureVideoForm.cpp | 3 +- project/src/Player/MultiPlayForm.cpp | 3 +- project/src/Player/PlayerForm.cpp | 3 +- project/src/Player/VideoRecorderPlayerForm.cpp | 3 +- project/src/Recorder/AudioRecorderForm.cpp | 1 + project/src/Recorder/VideoRecorderForm.cpp | 3 +- 24 files changed, 151 insertions(+), 24 deletions(-) create mode 100644 project/inc/AppResourceId.h create mode 100644 project/src/AppResourceId.cpp diff --git a/project/inc/AppResourceId.h b/project/inc/AppResourceId.h new file mode 100644 index 0000000..4f2e8d2 --- /dev/null +++ b/project/inc/AppResourceId.h @@ -0,0 +1,55 @@ +// +// Tizen C++ SDK +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.tizenopensource.org/license +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#ifndef _APP_RESOURCE_ID_H_ +#define _APP_RESOURCE_ID_H_ + +//Image +extern const wchar_t* IDF_IMAGE_VIEWER; +extern const wchar_t* IDF_IMAGE_CONVERTER; +extern const wchar_t* IDF_GIF_DECODER; +extern const wchar_t* IDF_IMAGE_FLIP_ROTATE; +extern const wchar_t* IDF_IMAGE_RESIZE; +extern const wchar_t* IDF_IMAGE_COLOR_CONVERT; + +//Audio +extern const wchar_t* IDF_AUDIOINOUT; +extern const wchar_t* IDF_TONEPLAYERFORM; +extern const wchar_t* IDF_AUDIO_EQUALIZER_FORM; + +//Camera +extern const wchar_t* IDF_CAMERA_CAPTURE; + +//Recorder +extern const wchar_t* IDF_AUDIO_RECORDER; +extern const wchar_t* IDF_VIDEO_RECORDER; + +//Player +extern const wchar_t* IDF_FORM_PLAYER; +extern const wchar_t* IDF_MULTI_PLAY; +extern const wchar_t* IDF_CAMERA_PLAYER; +extern const wchar_t* IDF_VIDEO_RECORDER_PLAYER; +extern const wchar_t* IDF_CAPTUREVIDEO; + +//Codec +extern const wchar_t* IDF_AUDIO_DECODER; +extern const wchar_t* IDF_AUDIO_ENCODER; +extern const wchar_t* IDF_VIDEO_DECODER; +extern const wchar_t* IDF_VIDEO_ENCODER; +extern const wchar_t* IDF_FRAME_EXTRACTOR; + +#endif // _APP_RESOURCE_ID_H_ diff --git a/project/src/AppResourceId.cpp b/project/src/AppResourceId.cpp new file mode 100644 index 0000000..b133f44 --- /dev/null +++ b/project/src/AppResourceId.cpp @@ -0,0 +1,53 @@ +// +// Tizen C++ SDK +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.tizenopensource.org/license +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include "AppResourceId.h" + +//Image +const wchar_t* IDF_IMAGE_VIEWER = L"IDF_IMAGE_VIEWER"; +const wchar_t* IDF_IMAGE_CONVERTER = L"IDF_IMAGE_CONVERTER"; +const wchar_t* IDF_GIF_DECODER = L"IDF_GIF_DECODER"; +const wchar_t* IDF_IMAGE_FLIP_ROTATE = L"IDF_IMAGE_FLIP_ROTATE"; +const wchar_t* IDF_IMAGE_RESIZE = L"IDF_IMAGE_RESIZE"; +const wchar_t* IDF_IMAGE_COLOR_CONVERT = L"IDF_IMAGE_COLOR_CONVERT"; + +//Audio +const wchar_t* IDF_AUDIOINOUT = L"IDF_AUDIOINOUT"; +const wchar_t* IDF_TONEPLAYERFORM = L"IDF_TONEPLAYERFORM"; +const wchar_t* IDF_AUDIO_EQUALIZER_FORM = L"IDF_AUDIO_EQUALIZER_FORM"; + +//camera +const wchar_t* IDF_CAMERA_CAPTURE = L"IDF_CAMERA_CAPTURE"; + +//Recorder +const wchar_t* IDF_AUDIO_RECORDER = L"IDF_AUDIO_RECORDER"; +const wchar_t* IDF_VIDEO_RECORDER = L"IDF_VIDEO_RECORDER"; + +//Player +const wchar_t* IDF_FORM_PLAYER = L"IDF_FORM_PLAYER"; +const wchar_t* IDF_MULTI_PLAY = L"IDF_MULTI_PLAY"; +const wchar_t* IDF_CAMERA_PLAYER = L"IDF_CAMERA_PLAYER"; +const wchar_t* IDF_VIDEO_RECORDER_PLAYER = L"IDF_VIDEO_RECORDER_PLAYER"; +const wchar_t* IDF_CAPTUREVIDEO = L"IDF_CAPTUREVIDEO"; + +//Codec +const wchar_t* IDF_AUDIO_DECODER = L"IDF_AUDIO_DECODER"; +const wchar_t* IDF_AUDIO_ENCODER = L"IDF_AUDIO_ENCODER"; +const wchar_t* IDF_VIDEO_DECODER = L"IDF_VIDEO_DECODER"; +const wchar_t* IDF_VIDEO_ENCODER = L"IDF_VIDEO_ENCODER"; +const wchar_t* IDF_FRAME_EXTRACTOR = L"IDF_FRAME_EXTRACTOR"; + diff --git a/project/src/Audio/AudioEqualizerForm.cpp b/project/src/Audio/AudioEqualizerForm.cpp index 4bc3ea4..645452d 100644 --- a/project/src/Audio/AudioEqualizerForm.cpp +++ b/project/src/Audio/AudioEqualizerForm.cpp @@ -21,6 +21,7 @@ #include "AudioEqualizerForm.h" #include "SafeMacros.h" #include "UnitTestFactory.h" +#include "AppResourceId.h" using namespace Tizen::Base; using namespace Tizen::Ui; @@ -91,7 +92,7 @@ AudioEqualizerForm::Initialize() AppLog("Enter"); // This is called at once when application is launched. // Construct an XML form - Construct(L"IDF_AUDIO_EQUALIZER_FORM"); + Construct(IDF_AUDIO_EQUALIZER_FORM); return; } diff --git a/project/src/Audio/AudioInOut.cpp b/project/src/Audio/AudioInOut.cpp index c739e7a..289e8c4 100644 --- a/project/src/Audio/AudioInOut.cpp +++ b/project/src/Audio/AudioInOut.cpp @@ -21,6 +21,7 @@ #include "AudioInOut.h" #include "SafeMacros.h" #include "UnitTestFactory.h" +#include "AppResourceId.h" using namespace Tizen::Base; using namespace Tizen::Ui; @@ -106,7 +107,7 @@ AudioInOut::Initialize() AppLog("Enter"); // This is called at once when application is launched. // Construct an XML form - Construct(L"IDF_AUDIOINOUT"); + Construct(IDF_AUDIOINOUT); return; } diff --git a/project/src/Audio/TonePlayerForm.cpp b/project/src/Audio/TonePlayerForm.cpp index 4d7c371..eccc75a 100644 --- a/project/src/Audio/TonePlayerForm.cpp +++ b/project/src/Audio/TonePlayerForm.cpp @@ -22,6 +22,7 @@ #include "SafeMacros.h" #include "UnitTestFactory.h" #include "TonePlayerForm.h" +#include "AppResourceId.h" using namespace Tizen::Base; using namespace Tizen::Ui; @@ -114,7 +115,7 @@ bool TonePlayerForm::Initialize() { // Construct an XML form - Construct(L"IDF_TONEPLAYERFORM"); + Construct(IDF_TONEPLAYERFORM); return true; } diff --git a/project/src/Camera/CameraCaptureForm.cpp b/project/src/Camera/CameraCaptureForm.cpp index 7590334..0674099 100644 --- a/project/src/Camera/CameraCaptureForm.cpp +++ b/project/src/Camera/CameraCaptureForm.cpp @@ -28,6 +28,7 @@ #include "UnitTestFactory.h" #include "MediaPlayerForm.h" #include "CameraCaptureForm.h" +#include "AppResourceId.h" using namespace Tizen::Ui; using namespace Tizen::Io; @@ -251,7 +252,7 @@ bool CameraCaptureForm::Initialize(void) { result r = E_SUCCESS; - r = Construct(L"IDF_CAMERA_CAPTURE"); + r = Construct(IDF_CAMERA_CAPTURE); AppLog("Initialize return = %s", GetErrorMessage(r)); return true; } diff --git a/project/src/Codec/AudioDecoderForm.cpp b/project/src/Codec/AudioDecoderForm.cpp index 0886f39..19a51b7 100644 --- a/project/src/Codec/AudioDecoderForm.cpp +++ b/project/src/Codec/AudioDecoderForm.cpp @@ -27,6 +27,7 @@ #include "MultiForm.h" #include "AudioDecoderForm.h" #include "WavReader.h" +#include "AppResourceId.h" using namespace std; @@ -157,7 +158,7 @@ bool AudioDecoderForm::Initialize(void) { // Construct an XML form - Construct(L"IDF_AUDIO_DECODER"); + Construct(IDF_AUDIO_DECODER); return true; } diff --git a/project/src/Codec/AudioEncoderForm.cpp b/project/src/Codec/AudioEncoderForm.cpp index 55cb831..cf8c664 100644 --- a/project/src/Codec/AudioEncoderForm.cpp +++ b/project/src/Codec/AudioEncoderForm.cpp @@ -24,6 +24,7 @@ #include "MultiForm.h" #include "AudioEncoderForm.h" #include "WavReader.h" +#include "AppResourceId.h" using namespace std; using namespace Tizen::Base; @@ -189,7 +190,7 @@ bool AudioEncoderForm::Initialize(void) { // Construct an XML form - Construct(L"IDF_AUDIO_ENCODER"); + Construct(IDF_AUDIO_ENCODER); return true; } diff --git a/project/src/Codec/VideoDecoderForm.cpp b/project/src/Codec/VideoDecoderForm.cpp index 9e6d7cb..9a7e526 100644 --- a/project/src/Codec/VideoDecoderForm.cpp +++ b/project/src/Codec/VideoDecoderForm.cpp @@ -25,6 +25,7 @@ #include "UnitTestFactory.h" #include "MultiForm.h" #include "VideoDecoderForm.h" +#include "AppResourceId.h" using namespace Tizen::Base; using namespace Tizen::Base::Runtime; @@ -138,7 +139,7 @@ VideoDecoderForm::SetDefault(void) bool VideoDecoderForm::Initialize(void) { - Construct(L"IDF_VIDEO_DECODER"); + Construct(IDF_VIDEO_DECODER); return true; } @@ -897,8 +898,6 @@ VideoDecoderForm::ContinueDecoding(void) DisplayFrame(true, __pDstBuf); } - - /*read more data from the file*/ FillBufferFromFile(__pSrcFile, __pSrcBuf); @@ -1327,7 +1326,6 @@ VideoDecoderForm::OnTimerExpired(Tizen::Base::Runtime::Timer& timer) if (__curState == PLAY_STATE_PLAYING) { - ContinueDecoding(); __wakeUpTimer.Start(WAIT_FOR_EVENT_PROCESSING); } diff --git a/project/src/Codec/VideoEncoderForm.cpp b/project/src/Codec/VideoEncoderForm.cpp index f928a89..438164e 100644 --- a/project/src/Codec/VideoEncoderForm.cpp +++ b/project/src/Codec/VideoEncoderForm.cpp @@ -23,6 +23,7 @@ #include "UnitTestFactory.h" #include "MultiForm.h" #include "VideoEncoderForm.h" +#include "AppResourceId.h" using namespace Tizen::Base; using namespace Tizen::Base::Runtime; @@ -155,7 +156,7 @@ VideoEncoderForm::~VideoEncoderForm(void) bool VideoEncoderForm::Initialize(void) { - Construct(L"IDF_VIDEO_ENCODER"); + Construct(IDF_VIDEO_ENCODER); return true; } diff --git a/project/src/Codec/VideoFrameExtractorForm.cpp b/project/src/Codec/VideoFrameExtractorForm.cpp index c754751..66de069 100644 --- a/project/src/Codec/VideoFrameExtractorForm.cpp +++ b/project/src/Codec/VideoFrameExtractorForm.cpp @@ -18,6 +18,7 @@ #include #include "UnitTestFactory.h" #include "VideoFrameExtractorForm.h" +#include "AppResourceId.h" using namespace Tizen::Base; using namespace Tizen::App; @@ -78,7 +79,7 @@ VideoFrameExtractorForm::~VideoFrameExtractorForm(void) bool VideoFrameExtractorForm::Initialize(void) { - Construct(L"IDF_FRAME_EXTRACTOR"); + Construct(IDF_FRAME_EXTRACTOR); return true; } diff --git a/project/src/Image/GifDecoderForm.cpp b/project/src/Image/GifDecoderForm.cpp index ee21823..9e0930d 100644 --- a/project/src/Image/GifDecoderForm.cpp +++ b/project/src/Image/GifDecoderForm.cpp @@ -22,6 +22,7 @@ #include "GifDecoderForm.h" #include "PixelFormatMapper.h" #include "UnitTestFactory.h" +#include "AppResourceId.h" using namespace Tizen::Base::Runtime; using namespace Tizen::Io; @@ -92,7 +93,7 @@ bool GifDecoderForm::Initialize(void) { - Construct(L"IDF_GIF_DECODER"); + Construct(IDF_GIF_DECODER); return true; } diff --git a/project/src/Image/ImageColorConvertForm.cpp b/project/src/Image/ImageColorConvertForm.cpp index 4b0b240..eca977e 100644 --- a/project/src/Image/ImageColorConvertForm.cpp +++ b/project/src/Image/ImageColorConvertForm.cpp @@ -22,6 +22,7 @@ #include "UnitTestFactory.h" #include "ImageColorConvertForm.h" #include "PixelFormatMapper.h" +#include "AppResourceId.h" using namespace Tizen::Base::Utility; using namespace Tizen::Io; @@ -95,7 +96,7 @@ ImageColorConvertForm::~ImageColorConvertForm(void) bool ImageColorConvertForm::Initialize(void) { - Construct(L"IDF_IMAGE_COLOR_CONVERT"); + Construct(IDF_IMAGE_COLOR_CONVERT); return true; } diff --git a/project/src/Image/ImageConverterForm.cpp b/project/src/Image/ImageConverterForm.cpp index fd8a18b..1ec6f8c 100644 --- a/project/src/Image/ImageConverterForm.cpp +++ b/project/src/Image/ImageConverterForm.cpp @@ -21,6 +21,7 @@ #include "ImageConverterForm.h" #include "PixelFormatMapper.h" #include "UnitTestFactory.h" +#include "AppResourceId.h" #define SECTION_NAME L"ImageConverter" @@ -101,7 +102,7 @@ ImageConverterForm::~ImageConverterForm(void) bool ImageConverterForm::Initialize(void) { - Construct(L"IDF_IMAGE_CONVERTER"); + Construct(IDF_IMAGE_CONVERTER); return true; } diff --git a/project/src/Image/ImageFlipRotateForm.cpp b/project/src/Image/ImageFlipRotateForm.cpp index cbbe427..63d0d27 100644 --- a/project/src/Image/ImageFlipRotateForm.cpp +++ b/project/src/Image/ImageFlipRotateForm.cpp @@ -21,6 +21,7 @@ #include "ImageFlipRotateForm.h" #include "UnitTestFactory.h" #include "PixelFormatMapper.h" +#include "AppResourceId.h" using namespace Tizen::Base; using namespace Tizen::Graphics; @@ -128,7 +129,7 @@ bool ImageFlipRotateForm::Initialize(void) { - Construct(L"IDF_IMAGE_FLIP_ROTATE"); + Construct(IDF_IMAGE_FLIP_ROTATE); return true; } diff --git a/project/src/Image/ImageResizeForm.cpp b/project/src/Image/ImageResizeForm.cpp index 435508e..f1ae96d 100644 --- a/project/src/Image/ImageResizeForm.cpp +++ b/project/src/Image/ImageResizeForm.cpp @@ -22,6 +22,7 @@ #include "ImageResizeForm.h" #include "PixelFormatMapper.h" #include "UnitTestFactory.h" +#include "AppResourceId.h" using namespace Tizen::Io; using namespace Tizen::System; @@ -84,7 +85,7 @@ bool ImageResizeForm::Initialize(void) { - Construct(L"IDF_IMAGE_RESIZE"); + Construct(IDF_IMAGE_RESIZE); return true; } diff --git a/project/src/Image/ImageViewerForm.cpp b/project/src/Image/ImageViewerForm.cpp index b7593a1..d681889 100644 --- a/project/src/Image/ImageViewerForm.cpp +++ b/project/src/Image/ImageViewerForm.cpp @@ -23,6 +23,7 @@ #include "ImageViewerForm.h" #include "UnitTestFactory.h" #include "PixelFormatMapper.h" +#include "AppResourceId.h" #define SECTION_NAME L"ImageViewer" #define PREV_INDEX 1 @@ -116,7 +117,7 @@ bool ImageViewerForm::Initialize(void) { - Construct(L"IDF_IMAGE_VIEWER"); + Construct(IDF_IMAGE_VIEWER); return true; } diff --git a/project/src/Player/CameraPlayerForm.cpp b/project/src/Player/CameraPlayerForm.cpp index 8e43919..9073e03 100644 --- a/project/src/Player/CameraPlayerForm.cpp +++ b/project/src/Player/CameraPlayerForm.cpp @@ -25,6 +25,7 @@ #include "UnitTestFactory.h" #include "MediaPlayerForm.h" #include "CameraPlayerForm.h" +#include "AppResourceId.h" using namespace Tizen::Ui; @@ -91,7 +92,7 @@ bool CameraPlayerForm::Initialize() { result r = E_SUCCESS; - r = Construct(L"IDF_CAMERA_PLAYER"); + r = Construct(IDF_CAMERA_PLAYER); AppLog("Initialize return = %s", GetErrorMessage(r)); return true; } diff --git a/project/src/Player/CaptureVideoForm.cpp b/project/src/Player/CaptureVideoForm.cpp index 73b8116..f9f2c35 100644 --- a/project/src/Player/CaptureVideoForm.cpp +++ b/project/src/Player/CaptureVideoForm.cpp @@ -19,6 +19,7 @@ #include #include #include "CaptureVideoForm.h" +#include "AppResourceId.h" using namespace Tizen::Io; using namespace Tizen::Base; @@ -106,7 +107,7 @@ bool CaptureVideoForm::Initialize() { // Construct an XML form - Construct(L"IDF_CAPTUREVIDEO"); + Construct(IDF_CAPTUREVIDEO); return true; } diff --git a/project/src/Player/MultiPlayForm.cpp b/project/src/Player/MultiPlayForm.cpp index d1215f5..e5ab43b 100644 --- a/project/src/Player/MultiPlayForm.cpp +++ b/project/src/Player/MultiPlayForm.cpp @@ -23,6 +23,7 @@ #include "MultiPlayForm.h" #include "UnitTestFactory.h" +#include "AppResourceId.h" using namespace Tizen::Base; using namespace Tizen::Media; @@ -83,7 +84,7 @@ bool MultiPlayForm::Initialize(void) { // Construct an XML form - Construct(L"IDF_MULTI_PLAY"); + Construct(IDF_MULTI_PLAY); return true; } diff --git a/project/src/Player/PlayerForm.cpp b/project/src/Player/PlayerForm.cpp index 3b0f846..a4a3279 100644 --- a/project/src/Player/PlayerForm.cpp +++ b/project/src/Player/PlayerForm.cpp @@ -23,6 +23,7 @@ #include "PlayerForm.h" #include "UnitTestFactory.h" +#include "AppResourceId.h" using namespace Tizen::Base; using namespace Tizen::Graphics; @@ -126,7 +127,7 @@ bool PlayerForm::Initialize(void) { // Construct an XML form - Construct(L"IDF_FORM_PLAYER"); + Construct(IDF_FORM_PLAYER); return true; } diff --git a/project/src/Player/VideoRecorderPlayerForm.cpp b/project/src/Player/VideoRecorderPlayerForm.cpp index 9a9a75b..50a6471 100644 --- a/project/src/Player/VideoRecorderPlayerForm.cpp +++ b/project/src/Player/VideoRecorderPlayerForm.cpp @@ -27,6 +27,7 @@ #include "UnitTestFactory.h" #include "MediaPlayerForm.h" #include "VideoRecorderPlayerForm.h" +#include "AppResourceId.h" using namespace Tizen::Ui; @@ -107,7 +108,7 @@ bool VideoRecorderPlayerForm::Initialize() { result r = E_SUCCESS; - r = Construct(L"IDF_VIDEO_RECORDER_PLAYER"); + r = Construct(IDF_VIDEO_RECORDER_PLAYER); AppLog("Initialize return = %s", GetErrorMessage(r)); return true; } diff --git a/project/src/Recorder/AudioRecorderForm.cpp b/project/src/Recorder/AudioRecorderForm.cpp index 0ddaf90..c20655c 100644 --- a/project/src/Recorder/AudioRecorderForm.cpp +++ b/project/src/Recorder/AudioRecorderForm.cpp @@ -24,6 +24,7 @@ #include "UnitTestFactory.h" #include "AudioRecorderForm.h" #include "MediaPlayerForm.h" +#include "AppResourceId.h" using namespace Tizen::Ui; using namespace Tizen::Io; diff --git a/project/src/Recorder/VideoRecorderForm.cpp b/project/src/Recorder/VideoRecorderForm.cpp index 132ad14..0fda336 100644 --- a/project/src/Recorder/VideoRecorderForm.cpp +++ b/project/src/Recorder/VideoRecorderForm.cpp @@ -23,6 +23,7 @@ #include "UnitTestFactory.h" #include "VideoRecorderForm.h" #include "MediaPlayerForm.h" +#include "AppResourceId.h" using namespace Tizen::Base; @@ -315,7 +316,7 @@ bool VideoRecorderForm::Initialize(void) { result r = E_SUCCESS; - r = Construct(L"IDF_VIDEO_RECORDER"); + r = Construct(IDF_VIDEO_RECORDER); AppLog("Initialize return = %s", GetErrorMessage(r)); return true; } -- 2.7.4