Panda3D

patcher.cxx
Go to the documentation of this file.
1 /**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file patcher.cxx
10 * @author mike
11 * @date 1997-01-09
12 */
13
14 #include "pandabase.h"
15
16 #ifdef HAVE_OPENSSL
17
18 #include "config_downloader.h"
19 #include "patcher.h"
20 #include "filename.h"
21
22 /**
23 *
24 */
25 Patcher::
26 Patcher() {
27 PT(Buffer) buffer = new Buffer(patcher_buffer_size);
28 init(buffer);
29 }
30
31 /**
32 *
33 */
34 Patcher::
35 Patcher(PT(Buffer) buffer) {
36 init(buffer);
37 }
38
39 /**
40 *
41 */
42 void Patcher::
43 init(PT(Buffer) buffer) {
44 nassertv(!buffer.is_null());
45 _buffer = buffer;
46
47 _patchfile = nullptr;
48 _patchfile = new Patchfile(_buffer);
49 }
50
51 /**
52 *
53 */
54 Patcher::
55 ~Patcher() {
56 delete _patchfile;
57 }
58
59 /**
60 *
61 */
62 int Patcher::
63 initiate(Filename &patch, Filename &infile) {
64 return _patchfile->initiate(patch, infile);
65 }
66
67 /**
68 *
69 */
70 int Patcher::
71 run() {
72 return _patchfile->run();
73 }
74
75 #endif // HAVE_OPENSSL
Buffer
Definition: buffer.h:24
Filename
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:39
config_downloader.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
filename.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
patcher.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.