nlib
BsDiff.h
[詳解]
1 
2 /*-
3  * Copyright 2003-2005 Colin Percival
4  * All rights reserved
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted providing that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
19  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25  * POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 //
29 // This file is the derived code of the original bsdiff.
30 //
31 
32 #pragma once
33 #ifndef INCLUDE_NN_NLIB_OSS_BSDIFF_H_
34 #define INCLUDE_NN_NLIB_OSS_BSDIFF_H_
35 
36 #include "nn/nlib/Config.h"
37 
38 #if defined(_MSC_VER) && defined(nx_oss_bsdiff_EXPORTS)
39 #undef NLIB_VIS_PUBLIC
40 #define NLIB_VIS_PUBLIC NLIB_WINEXPORT
41 #endif
42 
43 NLIB_NAMESPACE_BEGIN
44 class OutputStream;
45 namespace oss {
46 
47 NLIB_VIS_PUBLIC errno_t BsDiffZ(OutputStream* patch, void* old_data,
48  size_t old_size, void* new_data, size_t new_size) NLIB_NOEXCEPT;
49 NLIB_VIS_PUBLIC errno_t BsPatchZ(OutputStream* new_stream, void* old_data, size_t old_size,
50  void* patch_data, size_t patch_size) NLIB_NOEXCEPT;
51 
52 } // namespace oss
53 NLIB_NAMESPACE_END
54 
55 #if defined(_MSC_VER) && defined(nx_oss_bsdiff_EXPORTS)
56 #undef NLIB_VIS_PUBLIC
57 #define NLIB_VIS_PUBLIC NLIB_WINIMPORT
58 #endif
59 
60 #endif // INCLUDE_NN_NLIB_OSS_BSDIFF_H_
errno_t BsDiffZ(OutputStream *patch, void *old_data, size_t old_size, void *new_data, size_t new_size) noexcept
古いデータから新しいデータにアップデートするためのパッチを作成します。
#define NLIB_VIS_PUBLIC
関数やクラス等のシンボルをライブラリの外部に公開します。
Definition: Platform_unix.h:89
#define NLIB_NOEXCEPT
環境に合わせてnoexcept 又は同等の定義がされます。
Definition: Config.h:105
開発環境別の設定が書かれるファイルです。
errno_t BsPatchZ(OutputStream *new_stream, void *old_data, size_t old_size, void *patch_data, size_t patch_size) noexcept
古いデータとパッチデータから新しいデータを作成します。
出力ストリームの基底クラスです。このクラスを実体化することはできません。
Definition: OutputStream.h:30
int errno_t
intのtypedefで、戻り値としてPOSIXのエラー値を返すことを示します。
Definition: NMalloc.h:37