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 FUiIClipboard.h
20 * @brief This is the header file for the %IClipboard interface.
22 * This header file contains the declarations of the %IClipboard interface and its helper classes.
25 #ifndef _FUI_ICLIPBOARD_H_
26 #define _FUI_ICLIPBOARD_H_
28 #include <FUiClipboardItem.h>
30 namespace Tizen { namespace Ui
33 // This class is for internal use only. Using this method can cause behavioral, security-related,
34 // and consistency-related issues in the application.
36 // @interface IClipboard
37 // @brief This interface defines the operations of %IClipboard.
41 // The %IClipboard interface defines the operations of clipboard.
42 class _OSP_EXPORT_ IClipboard
46 // This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
50 virtual ~IClipboard(void) {}
54 // This method is for internal use only. Using this method can cause behavioral, security-related,
55 // and consistency-related issues in the application.
57 // Copies the specified item to the system Clipboard.
61 // @return An error code
62 // @param[in] item The item to be saved in the system clipboard
63 // @exception E_SUCCESS The method is successful.
64 // @exception E_INVALID_ARG A specified input parameter is invalid.
65 // @exception E_SYSTEM A system error has occurred.
66 // @remarks The method returns E_INVALID_ARG if the specified item is
68 // For the text and image data type, the data itself is copied
69 // by the method and kept by the system clipboard.
71 virtual result CopyItem(const ClipboardItem& item) = 0;
74 // This method is for internal use only. Using this method can cause behavioral, security-related,
75 // and consistency-related issues in the application.
77 // Gets a collection of items that matches the specified data types from the
82 // @return The pointer to an IList which contains a collection of ClipboardItem, @n
83 // else @c null if an error occurs
84 // @param[in] dataTypes The types of items. Multiple data types can be
85 // combined using bitwise OR (Tizen::Ui::ClipboardDataType).
86 // @exception E_SUCCESS The method is successful.
87 // @exception E_OBJ_NOT_FOUND The items of the specified data are not found.
88 // @exception E_SYSTEM A system error has occurred.
89 // @remarks The specific error code can be accessed using the GetLastResult() method. @n
90 // This method returns the pointer to an IList which contains
91 // a collection of ClipboardItem. The returned pointer to IList
92 // and all elements in IList must be deleted by applications.@n
93 // The items in IList are sorted in the reverse order in which
94 // they are copied to the system clipboard. So, the first
95 // item in IList is the latest one among them. @n
96 // @c dataType can be a combination of ClipboardDataType.
98 virtual Tizen::Base::Collection::IList* RetrieveItemsN(unsigned long dataTypes) = 0;
101 // This method is for internal use only. Using this method can cause behavioral, security-related,
102 // and consistency-related issues in the application.
104 // Gets the latest item for the specified data types from the system clipboard.
108 // @return The pointer to a ClipboardItem, @n
109 // else @c null if an error occurs
110 // @param[in] dataTypes The types of items. Multiple data types can be
111 // combined using bitwise OR (Tizen::Ui::ClipboardDataType).
112 // @exception E_SUCCESS The method is successful.
113 // @exception E_OBJ_NOT_FOUND The item of the specified data types is not found.
114 // @exception E_SYSTEM A system error has occurred.
115 // @remarks The specific error code can be accessed using the GetLastResult() method. @n
116 // This method returns the pointer to a ClipboardItem. The
117 // returned ClipboardItem must be deleted by applications.@n
118 // If there is no matched item in the system clipboard, this method
119 // returns @c null. @n
120 // @c dataType can be a combination of ClipboardDataType.
122 virtual Tizen::Ui::ClipboardItem* RetrieveLatestItemN(unsigned long dataTypes) = 0;
126 // This method is for internal use only. Using this method can cause behavioral, security-related,
127 // and consistency-related issues in the application.
129 // This method is reserved and may change its name at any time without prior notice.
131 virtual void IClipboard_Reserved1(void) {}
134 // This method is for internal use only. Using this method can cause behavioral, security-related,
135 // and consistency-related issues in the application.
137 // This method is reserved and may change its name at any time without prior notice.
139 virtual void IClipboard_Reserved2(void) {}
142 // This method is for internal use only. Using this method can cause behavioral, security-related,
143 // and consistency-related issues in the application.
145 // This method is reserved and may change its name at any time without prior notice.
147 virtual void IClipboard_Reserved3(void) {}
152 #endif //_FUI_ICLIPBOARD_H_