update header for Doxygen
[framework/osp/bluetooth.git] / inc / FNetBtBluetoothOppClient.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19  * @file    FNetBtBluetoothOppClient.h
20  * @brief   This is the header file for the %BluetoothOppClient class.
21  *
22  * This header file contains the declarations of the %BluetoothOppClient class.
23  */
24 #ifndef _FNET_BT_BLUETOOTH_OPP_CLIENT_H_
25 #define _FNET_BT_BLUETOOTH_OPP_CLIENT_H_
26
27 #include <FBaseObject.h>
28 #include <FBaseResult.h>
29
30 namespace Tizen { namespace Base
31 {
32 class String;
33 } }
34
35 namespace Tizen { namespace Net { namespace Bluetooth
36 {
37
38 // forward declarations
39 class BluetoothDevice;
40 class IBluetoothOppClientEventListener;
41 class _BluetoothOppClientImpl;
42
43 /**
44  * @class   BluetoothOppClient
45  * @brief   This class provides methods to handle the %Bluetooth Object Push Profile (OPP) client, such as the
46  *          outgoing connection requests.
47  *
48  * @since   2.0
49  *
50  * The %BluetoothOppClient class provides methods to handle the %Bluetooth Object Push Profile (OPP) client, such as the outgoing
51  * connection requests.
52  * @n
53  * For more information on the class features, see
54  * <a href="../org.tizen.native.appprogramming/html/guide/net/bluetooth_namespace.htm">Bluetooth Guide</a>.
55  */
56 class _OSP_EXPORT_ BluetoothOppClient
57         : public Tizen::Base::Object
58 {
59 public:
60         /**
61          * The object is not fully constructed after this constructor is called. For full construction, the Construct() method
62          * must be called right after calling this constructor.
63          *
64          * @since       2.0
65          */
66         BluetoothOppClient(void);
67
68         /**
69          * This destructor overrides Tizen::Base::Object::~Object().
70          *
71          * @since       2.0
72          */
73         virtual ~BluetoothOppClient(void);
74
75         /**
76          * Constructs and initializes this instance of %BluetoothOppClient with the specified listener.
77          *
78          * @since       2.0
79          * @feature     %http://tizen.org/feature/network.bluetooth
80          *
81          * @return      An error code
82          * @param[in]   listener                The event listener for the OPP client
83          * @exception   E_SUCCESS               The method is successful.
84          * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
85          * @exception   E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
86          *                                      For more information, see
87          *                                      <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">
88          *                                      Application Filtering</a>.
89          * @exception   E_SYSTEM                A system error has occurred.
90          * @remarks     Before calling this method, check whether the feature is supported by 
91          *                      Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
92          */
93         result Construct(IBluetoothOppClientEventListener& listener);
94
95         /**
96          * Pushes a file to a remote OPP server. @n
97          * The file transfer starts when the OPP server accepts the request.
98          *
99          * @if OSPCOMPAT
100          * @brief <i> [Compatibility] </i>
101          * @endif
102          * @since       2.0
103          * @if OSPCOMPAT
104          * @compatibility   This method has compatibility issues. @n
105          *                  For more information, see @ref CompIoPathPage "here".
106          * @endif
107          * @privlevel   public
108          * @privilege   %http://tizen.org/privilege/bluetooth.opp
109          *
110          * @return      An error code
111          * @param[in]   remoteDevice                The remote OPP server
112          * @param[in]   filePath                    The path of the source file
113          * @exception   E_SUCCESS                   The method is successful.
114          * @exception   E_INVALID_STATE             This instance is in an invalid state. @n
115          *                                          For example, %Bluetooth is not activated.
116          * @exception   E_IN_PROGRESS               The push process is in progress.
117          * @exception   E_PRIVILEGE_DENIED          The application does not have the privilege to call this method.
118          * @exception   E_USER_NOT_CONSENTED        The user blocks an application from calling this method. @b Since: @b 2.1
119          * @exception   E_SERVICE_UNAVAILABLE       The OPP service is unavailable.
120          * @exception   E_INACCESSIBLE_PATH         The specified @c filePath is inaccessible.
121          * @exception   E_REMOTE_DEVICE_NOT_FOUND   The input device is not found. @n
122          *                                          This exception is currently not in use.
123          * @exception   E_FAILURE                   The method has failed.
124          * @remarks     If the local device is not paired with the specified target device, the pairing process starts
125          *              internally before the push request is sent.
126          * @see         IBluetoothOppServerEventListener::OnOppPushRequested()
127          */
128         result PushFile(const BluetoothDevice& remoteDevice, const Tizen::Base::String& filePath);
129
130         /**
131          * Cancels the file push request in progress. @n
132          * If the %CancelPush() method is called before the OPP server accepts the push request, the
133          * IBluetoothOppClientEventListener::OnOppPushResponded() method is called and its result @c E_SYSTEM is thrown. @n
134          * If this method is called during the file transfer, the IBluetoothOppClientEventListener::OnOppTransferDone()
135          * method is called with @c isCompleted as @c false.
136          *
137          * @since       2.0
138          * @privlevel   public
139          * @privilege   %http://tizen.org/privilege/bluetooth.opp
140          *
141          * @return      An error code
142          * @exception   E_SUCCESS               The method is successful.
143          * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
144          *                                      For example, %Bluetooth is not activated.
145          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified
146          *                                      operation. @n
147          *                                      For example, the push request is not sent or accepted by a remote device.
148          * @exception   E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
149          * @exception   E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
150          * @exception   E_FAILURE               The method has failed.
151          */
152         result CancelPush(void);
153
154         /**
155          * Sets the minimum interval of invocation of IBluetoothOppClientEventListener::OnOppTransferInProgress() in
156          * percentage. @n
157          * The default value is @c 5.
158          *
159          * @since       2.0
160          *
161          * @return      An error code
162          * @param[in]   percent                 The minimum period of progress interval as a percentage value
163          * @exception   E_SUCCESS               The method is successful.
164          * @exception   E_OUT_OF_RANGE          The value of an argument is outside the valid range defined by the method.
165          */
166         result SetMinProgressInterval(int percent);
167
168 private:
169         //
170         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying
171         // of objects.
172         //
173         BluetoothOppClient(const BluetoothOppClient& value);
174
175         //
176         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit
177         // copying of objects.
178         //
179         BluetoothOppClient& operator =(const BluetoothOppClient& value);
180
181 private:
182         _BluetoothOppClientImpl* __pImpl;
183
184 }; // BluetoothOppClient
185
186 } } }
187 #endif // _FNET_BT_BLUETOOTH_OPP_CLIENT_H_