source: trunk/poppler/mypoppler/poppler/FileSpec.h @ 497

Last change on this file since 497 was 497, checked in by Silvan Scherrer, 10 years ago

Lucide: updated fontconfig and poppler

File size: 1.8 KB
Line 
1//========================================================================
2//
3// FileSpec.h
4//
5// All changes made under the Poppler project to this file are licensed
6// under GPL version 2 or later
7//
8// Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
9//
10// To see a description of the changes please see the Changelog file that
11// came with your tarball or type make ChangeLog if you are building from git
12//
13//========================================================================
14
15#ifndef FILE_SPEC_H
16#define FILE_SPEC_H
17
18#ifdef USE_GCC_PRAGMAS
19#pragma interface
20#endif
21
22#include "Object.h"
23
24class EmbFile {
25public:
26  EmbFile(Object *efStream);
27  ~EmbFile();
28
29  int size() { return m_size; }
30  GooString *modDate() { return m_modDate; }
31  GooString *createDate() { return m_createDate; }
32  GooString *checksum() { return m_checksum; }
33  GooString *mimeType() { return m_mimetype; }
34  Stream *stream() { return isOk() ? m_objStr.getStream() : NULL; }
35  GBool isOk() { return m_objStr.isStream(); }
36
37private:
38  int m_size;
39  GooString *m_createDate;
40  GooString *m_modDate;
41  GooString *m_checksum;
42  GooString *m_mimetype;
43  Object m_objStr;
44};
45
46class FileSpec {
47public:
48  FileSpec(Object *fileSpec);
49  ~FileSpec();
50
51  GBool isOk() { return ok; }
52
53  GooString *getFileName() const { return fileName; }
54  GooString *getFileNameForPlatform();
55  GooString *getDescription() const { return desc; }
56  EmbFile *getEmbeddedFile();
57
58private:
59  GBool ok;
60
61  Object fileSpec;
62
63  GooString *fileName;         // F, UF, DOS, Mac, Unix
64  GooString *platformFileName;
65  Object fileStream;           // Ref to F entry in UF
66  EmbFile *embFile;
67  GooString *desc;             // Desc
68};
69
70GBool getFileSpecName (Object *fileSpec, Object *fileName);
71GBool getFileSpecNameForPlatform (Object *fileSpec, Object *fileName);
72
73#endif /* FILE_SPEC_H */
Note: See TracBrowser for help on using the repository browser.