5 * Created by Alyssa Milburn on Fri Jan 18 2008.
6 * Copyright (c) 2008 Alyssa Milburn. All rights reserved.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
26 #include <boost/filesystem/path.hpp>
28 namespace fs
= boost::filesystem
;
38 std::vector
<cobBlock
*> blocks
;
40 cobFile(fs::path filepath
);
42 fs::path
getPath() { return path
; }
43 std::istream
&getStream() { return file
; }
50 unsigned char *buffer
;
52 std::streampos offset
;
63 bool isLoaded() { return loaded
; }
64 cobFile
*getParent() { return parent
; }
65 std::streampos
getOffset() { return offset
; }
66 std::string
getType() { return type
; }
67 unsigned char *getBuffer() { assert(loaded
); return buffer
; }
68 unsigned int getSize() { return size
; }
76 cobAgentBlock(cobBlock
*p
);
79 cobBlock
*getParent() { return parent
; }
81 unsigned short quantityremaining
;
82 unsigned int lastusage
;
83 unsigned int reuseinterval
;
84 unsigned char usebyday
;
85 unsigned char usebymonth
;
86 unsigned short usebyyear
;
89 std::string description
;
90 std::string installscript
;
91 std::string removescript
;
92 std::vector
<std::string
> scripts
;
94 std::vector
<unsigned short> deptypes
;
95 std::vector
<std::string
> depnames
;
97 unsigned short thumbnailwidth
;
98 unsigned short thumbnailheight
;
99 unsigned short *thumbnail
;
107 cobFileBlock(cobBlock
*p
);
110 cobBlock
*getParent() { return parent
; }
112 unsigned short filetype
;
113 unsigned int filesize
;
114 std::string filename
;
115 unsigned char *getFileContents();