Fix SettingClient to get instance.
[platform/framework/native/appfw.git] / src / app / inc / FApp_AppMessageImpl.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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         FApp_AppMessageImpl.h
19  * @brief       This is the header file of the %_AppMessageImpl class.
20  *
21  * This header file contains the declarations of the %_AppMessageImpl class.
22  */
23
24 #ifndef _FAPP_INTERNAL_APP_MESSAGE_IMPL_H_
25 #define _FAPP_INTERNAL_APP_MESSAGE_IMPL_H_
26
27 #include <FBaseObject.h>
28 #include <FBaseString.h>
29
30 typedef struct _bundle_t bundle;
31
32
33 namespace Tizen { namespace Base { namespace Collection { class IList; } } }
34 namespace Tizen { namespace Base { namespace Collection { class IMap; } } }
35 namespace Tizen { namespace Base { namespace Collection { class ArrayList; } } }
36
37 namespace Tizen { namespace App
38 {
39
40 /**
41  * @class        _AppMessageImpl
42  * @brief
43  * @since 2.1
44  *
45  *
46  */
47 class _OSP_EXPORT_ _AppMessageImpl
48 {
49 public:
50         _AppMessageImpl(void);
51
52         ~_AppMessageImpl(void);
53
54         _AppMessageImpl(const _AppMessageImpl& rhs);
55
56         _AppMessageImpl& operator=(const _AppMessageImpl& rhs);
57
58         const bundle* GetBundle(void) const
59         {
60                 return __pBundle;
61         }
62
63         bundle* GetBundle(void)
64         {
65                 return __pBundle;
66         }
67
68         Tizen::Base::String GetValue(const wchar_t key[]) const;
69
70         Tizen::Base::String GetValue(const Tizen::Base::String& key) const;
71
72         result AddData(const Tizen::Base::String& key, const Tizen::Base::String& value);
73
74         result AddData(const Tizen::Base::Collection::IList* pList);
75
76         result AddData(const Tizen::Base::Collection::IMap* pMap);
77
78         result AddValueArray(const Tizen::Base::String& key, const Tizen::Base::Collection::IList* pList);
79
80         result AddValueArraySingle(const Tizen::Base::String& key, const Tizen::Base::String& value);
81
82         result RemoveData(const Tizen::Base::String& key);
83
84         static result SetOperation(bundle* pBundle, const Tizen::Base::String& operation);
85
86         static result SetUri(bundle* pBundle, const Tizen::Base::String& uri);
87
88         static result SetMime(bundle* pBundle, const Tizen::Base::String& mime);
89
90         static result SetCategory(bundle* pBundle, const Tizen::Base::String& category);
91
92         static result AddData(bundle* pBundle, const Tizen::Base::String& key, const Tizen::Base::String& value);
93
94         static result AddData(bundle* pBundle, const Tizen::Base::Collection::IList* pList);
95
96         static result RemoveData(bundle* pBundle, const Tizen::Base::String& key);
97
98         static result AddStringMap(bundle* pBundle,  const Tizen::Base::Collection::IMap* pMap);
99
100         static Tizen::Base::Collection::ArrayList* GetValueArrayN(bundle* pBundle, const char* pKey);
101         static Tizen::Base::Collection::ArrayList* GetValueArrayN(bundle* pBundle, const Tizen::Base::String& key);
102
103         static result AddValueArray(bundle* pBundle, const char* pKey, const Tizen::Base::Collection::IList* pList);
104         static result AddValueArray(bundle* pBundle, const Tizen::Base::String& key, const Tizen::Base::Collection::IList* pList);
105
106 private:
107         bundle* __pBundle;
108 };
109
110 } } // Tizen::App
111
112 #endif //_FAPP_INTERNAL_APP_MESSAGE_IMPL_H_
113