diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-03-01 19:17:32 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-03-01 19:17:32 +0000 |
commit | e38d2351b83fa65c66ccde443777647ef5cb6cff (patch) | |
tree | 1897fc20e9f73a81c520a5b9f76f8ed042124883 /src/translators/pilotdb/libpalm/Database.cpp | |
download | tellico-e38d2351b83fa65c66ccde443777647ef5cb6cff.tar.gz tellico-e38d2351b83fa65c66ccde443777647ef5cb6cff.zip |
Added KDE3 version of Tellico
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1097620 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/translators/pilotdb/libpalm/Database.cpp')
-rw-r--r-- | src/translators/pilotdb/libpalm/Database.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/translators/pilotdb/libpalm/Database.cpp b/src/translators/pilotdb/libpalm/Database.cpp new file mode 100644 index 0000000..38d896f --- /dev/null +++ b/src/translators/pilotdb/libpalm/Database.cpp @@ -0,0 +1,43 @@ +/* + * palm-db-tools: General interface to a PalmOS database. + * Copyright (C) 2000 by Tom Dyas ([email protected]) + * + * This file implens an abstract interface to PalmOS + * databases. Subclasses would include the class that reads/writes PDB + * files and possibly databases that can be accessed over the HotSync + * protocols. + */ + +#include "palmtypes.h" +#include "Record.h" +#include "Database.h" + +#ifndef __GNUG__ + +// MSVC: Visual C++ doesn't like initializers in the header ... +const PalmLib::pi_uint16_t PalmLib::Database::FLAG_HDR_RESOURCE = 0x0001; +const PalmLib::pi_uint16_t PalmLib::Database::FLAG_HDR_READ_ONLY = 0x0002; +const PalmLib::pi_uint16_t PalmLib::Database::FLAG_HDR_APPINFO_DIRTY = 0x0004; +const PalmLib::pi_uint16_t PalmLib::Database::FLAG_HDR_BACKUP = 0x0008; +const PalmLib::pi_uint16_t PalmLib::Database::FLAG_HDR_OK_TO_INSTALL_NEWER = 0x0010; +const PalmLib::pi_uint16_t PalmLib::Database::FLAG_HDR_RESET_AFTER_INSTALL = 0x0020; +const PalmLib::pi_uint16_t PalmLib::Database::FLAG_HDR_COPY_PREVENTION = 0x0040; +const PalmLib::pi_uint16_t PalmLib::Database::FLAG_HDR_STREAM = 0x0080; +const PalmLib::pi_uint16_t PalmLib::Database::FLAG_HDR_HIDDEN = 0x0100; +const PalmLib::pi_uint16_t PalmLib::Database::FLAG_HDR_LAUNCHABLE_DATA = 0x0200; +const PalmLib::pi_uint16_t PalmLib::Database::FLAG_HDR_OPEN = 0x8000; +const PalmLib::pi_char_t PalmLib::Record::FLAG_ATTR_DELETED = 0x80; +const PalmLib::pi_char_t PalmLib::Record::FLAG_ATTR_DIRTY = 0x40; +const PalmLib::pi_char_t PalmLib::Record::FLAG_ATTR_BUSY = 0x20; +const PalmLib::pi_char_t PalmLib::Record::FLAG_ATTR_SECRET = 0x10; + +#endif + +PalmLib::Database::Database(bool resourceDB) + : m_name(""), m_version(0), m_time_created(0), m_time_modified(0), + m_time_backup(0), m_modification(0), m_unique_id_seed(0) +{ + m_flags = resourceDB ? FLAG_HDR_RESOURCE : 0; + m_type = PalmLib::mktag(' ', ' ', ' ', ' '); + m_creator = PalmLib::mktag(' ', ' ', ' ', ' '); +} |