2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiClipboardItem.h
20 * @brief This is the header file for the %ClipboardItem class.
22 * This header file contains the declarations of the %ClipboardItem class and its helper classes.
25 #ifndef _FUI_CLIPBOARD_ITEM_H_
26 #define _FUI_CLIPBOARD_ITEM_H_
28 #include <FUiClipboardTypes.h>
29 #include <FBaseObject.h>
31 namespace Tizen { namespace Ui
33 class _ClipboardItemImpl;
36 * @class ClipboardItem
37 * @brief This class defines a common behavior for %ClipboardItem.
41 * @final This class is not intended for extension.
43 * The %ClipboardItem class represents the items in the system Clipboard. The %ClipboardItem is the unit of data handling between
44 * the system clipboard and applications, and it contains both data itself and the type of the data.
46 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/clipboard.htm">Clipboard</a>.
49 class _OSP_EXPORT_ ClipboardItem
50 : public Tizen::Base::Object
54 * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
61 * This destructor overrides Tizen::Base::Object::~Object().
65 virtual ~ClipboardItem(void);
68 * Initializes this instance of %ClipboardItem with the specified parameters.
72 * @return An error code
73 * @param[in] dataType The data type
74 * @param[in] data The data to copy
75 * @exception E_SUCCESS The method is successful.
76 * @exception E_INVALID_ARG A specified input parameter is invalid.
77 * @exception E_SYSTEM A system error has occurred.
78 * @remarks For the image data type, the bitmap instance must be deleted
79 * by the application after the item is copied to the clipboard.
81 result Construct(ClipboardDataType dataType, const Tizen::Base::Object& data);
84 * Gets the data type of %ClipboardItem.
88 * @return The data type of the clipboard item
90 ClipboardDataType GetDataType(void) const;
93 * Gets the data of %ClipboardItem.
97 * @return The pointer to the data
98 * @remarks The application needs to type-cast the returned data object
99 * according to its data type.
101 Tizen::Base::Object* GetData(void) const;
105 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
107 ClipboardItem(const ClipboardItem& rhs);
110 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
112 ClipboardItem& operator =(const ClipboardItem& rhs);
115 friend class _ClipboardItemImpl;
118 _ClipboardItemImpl* __pImpl;
123 #endif // _FUI_CLIPBOARD_ITEM_H_