2014-12-03 08:39:06 +00:00
|
|
|
/* Copyright (c) 2013-2014 Jeffrey Pfau
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2014-07-07 06:39:27 +00:00
|
|
|
#ifndef PATCH_H
|
|
|
|
#define PATCH_H
|
|
|
|
|
2014-10-12 01:18:47 +00:00
|
|
|
#include "util/common.h"
|
2014-07-07 06:39:27 +00:00
|
|
|
|
2014-07-16 08:31:10 +00:00
|
|
|
struct VFile;
|
|
|
|
|
2014-07-07 06:39:27 +00:00
|
|
|
struct Patch {
|
2014-07-16 08:31:10 +00:00
|
|
|
struct VFile* vf;
|
2014-07-07 06:39:27 +00:00
|
|
|
|
|
|
|
size_t (*outputSize)(struct Patch* patch, size_t inSize);
|
2016-08-29 03:36:52 +00:00
|
|
|
bool (*applyPatch)(struct Patch* patch, const void* in, size_t inSize, void* out, size_t outSize);
|
2014-07-07 06:39:27 +00:00
|
|
|
};
|
|
|
|
|
2014-07-16 08:31:10 +00:00
|
|
|
bool loadPatch(struct VFile* vf, struct Patch* patch);
|
2014-07-07 06:39:27 +00:00
|
|
|
|
|
|
|
#endif
|