2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @author Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
20 * @brief This file is the implementation file of copy
25 #include <dpl/abstract_waitable_input.h>
26 #include <dpl/abstract_waitable_output.h>
27 #include <dpl/exception.h>
32 * Copy failed exception
34 DECLARE_EXCEPTION_TYPE(Exception, CopyFailed)
37 * Copy all bytes abstract waitable input to abstract waitable output
39 * @param[in] input Abstract waitable input to copy from
40 * @param[in] output Abstract waitable output to copy to
41 * @throw CopyFailed An error occurred while copying. Look into exception trace for details.
43 void Copy(AbstractWaitableInput *input, AbstractWaitableOutput *output);
46 * Copy exactly totalBytes bytes abstract waitable input to abstract waitable output
48 * @param[in] input Abstract waitable input to copy from
49 * @param[in] output Abstract waitable output to copy to
50 * @throw CopyFailed An error occurred while copying. Look into exception trace for details.
52 void Copy(AbstractWaitableInput *input, AbstractWaitableOutput *output, size_t totalBytes);