Tizen 2.0 Release
[apps/osp/Phone.git] / inc / PhnAppUtility.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://floralicense.org/license/
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file                PhnAppUtility.h
19  * @brief               This is the header file for the %AppUtility class.
20  *
21  * This header file contains the declarations for %AppUtility class.
22  */
23 #ifndef _PHN_APP_UTILITY_H_
24 #define _PHN_APP_UTILITY_H_
25
26 #include <FBase.h>
27 #include <FMedia.h>
28
29 enum KeypadTextPosition
30 {
31         POSITION_LEFT,
32         POSITION_RIGHT,
33         POSITION_CENTER,
34         POSITION_TOP_LEFT,
35         POSITION_TOP_CENTER,
36         POSITION_BOTTOM_LEFT,
37         POSITION_BOTTOM_CENTER
38 };
39
40 /**
41  * @class AppUtility
42  * @brief This class provides common functionalities across application through static member functions.
43  * Its instance cannot needed.
44  *
45  */
46 class AppUtility
47 {
48 private:
49         AppUtility(void);
50         AppUtility(const AppUtility& obj);
51         virtual ~AppUtility(void);
52
53 public:
54         /**
55          * Fetches the String from resources based on
56          * resource id provided by "stringId".
57          */
58         static Tizen::Base::String GetResourceString(const Tizen::Base::String& stringId);
59
60         /**
61          * Fetches the Bitmap from resources and
62          * scales it to specified width and height, if provided.
63          */
64         static Tizen::Graphics::Bitmap* GetBitmapFromResourcesN(const Tizen::Base::String& imagePath, int imgWidth = 0, int imgHeight = 0);
65 };
66
67 #endif // _PHN_APP_UTILITY_H_