| 1 |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 |
/* |
| 3 |
* This file is part of the libepubgen project. |
| 4 |
* |
| 5 |
* This Source Code Form is subject to the terms of the Mozilla Public |
| 6 |
* License, v. 2.0. If a copy of the MPL was not distributed with this |
| 7 |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 8 |
*/ |
| 9 |
|
| 10 |
#include "EPUBBinaryContent.h" |
| 11 |
|
| 12 |
#include <libepubgen/EPUBPackage.h> |
| 13 |
|
| 14 |
namespace libepubgen |
| 15 |
{ |
| 16 |
|
| 17 |
EPUBBinaryContent::EPUBBinaryContent() |
| 18 |
: m_data() |
| 19 |
{ |
| 20 |
} |
| 21 |
|
| 22 |
void EPUBBinaryContent::insertBinaryData(const librevenge::RVNGBinaryData &data) |
| 23 |
{ |
| 24 |
m_data.append(data); |
| 25 |
} |
| 26 |
|
| 27 |
void EPUBBinaryContent::writeTo(EPUBPackage &package, const char *const name) |
| 28 |
{ |
| 29 |
package.openBinaryFile(name); |
| 30 |
package.insertBinaryData(m_data); |
| 31 |
package.closeBinaryFile(); |
| 32 |
} |
| 33 |
|
| 34 |
} |
| 35 |
|
| 36 |
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ |