KeePass   KeePass Help Center Home KeePass Home | Package Downloads | Flag Translations | Blocks Plugins | Donate Donate  
Home Help Center Home | People Forums | Award Awards | Link Links | Search Search  







IKpDatabase Struct Referenceabstract

Interface to a database handling object. More...

#include <IKpDatabase.h>

Inheritance diagram for IKpDatabase:
IKpUnknown

Public Member Functions

virtual HRESULT InitPrimaryInstance ()=0
 Used by KeePass internally, plugins must not call this method. More...
 
virtual INT SetMasterKey (LPCTSTR lpMasterKey, BOOL bDiskDrive, LPCTSTR lpSecondKey)=0
 Set the master key for the database (will be used in the database loading / saving process). More...
 
virtual DWORD GetEntryCount ()=0
 Returns the total number of entries in database. More...
 
virtual DWORD GetGroupCount ()=0
 Returns the total number of groups in database. More...
 
virtual DWORD GetEntryCountInGroup (LPCTSTR lpGroup)=0
 Count entries in a group (identified by its name). More...
 
virtual DWORD GetEntryCountInGroupN (DWORD dwGroupId)=0
 Count entries in a group (identified by its ID). More...
 
virtual PW_ENTRYGetEntry (DWORD dwIndex)=0
 Get an entry (by index). More...
 
virtual PW_ENTRYGetEntryByGroup (DWORD dwGroupId, DWORD dwIndex)=0
 Get an entry (by specifying an index of a group). More...
 
virtual DWORD GetEntryByGroupN (DWORD dwGroupId, DWORD dwIndex)=0
 
virtual PW_ENTRYGetEntryByUuid (const BYTE *pUuid)=0
 Get an entry (by its UUID). More...
 
virtual DWORD GetEntryByUuidN (const BYTE *pUuid)=0
 
virtual DWORD GetEntryPosInGroup (const PW_ENTRY *pEntry)=0
 
virtual PW_ENTRYGetLastEditedEntry ()=0
 Get the entry that was last modified. More...
 
virtual PW_GROUPGetGroup (DWORD dwIndex)=0
 Get a group (by index). More...
 
virtual PW_GROUPGetGroupById (DWORD dwGroupId)=0
 Get a group (by ID). More...
 
virtual DWORD GetGroupByIdN (DWORD dwGroupId)=0
 
virtual DWORD GetGroupId (LPCTSTR lpGroupName)=0
 
virtual DWORD GetGroupIdByIndex (DWORD dwIndex)=0
 
virtual DWORD GetLastChildGroup (DWORD dwParentIndex)=0
 
virtual BOOL GetGroupTree (DWORD dwGroupId, DWORD *pvIndices)=0
 
virtual BOOL AddGroup (const PW_GROUP *pTemplate)=0
 
virtual BOOL AddEntry (const PW_ENTRY *pTemplate)=0
 
virtual BOOL BackupEntry (const PW_ENTRY *pe, BOOL *pbGroupCreated)=0
 
virtual BOOL DeleteEntry (DWORD dwIndex)=0
 
virtual BOOL DeleteGroupById (DWORD dwGroupId, BOOL bCreateBackupEntries)=0
 
virtual BOOL SetGroup (DWORD dwIndex, const PW_GROUP *pTemplate)=0
 
virtual BOOL SetEntry (DWORD dwIndex, const PW_ENTRY *pTemplate)=0
 
virtual HRESULT LockEntryPassword (PW_ENTRY *pEntry)=0
 In-memory protection: encrypt the password of an entry. More...
 
virtual HRESULT UnlockEntryPassword (PW_ENTRY *pEntry)=0
 In-memory protection: decrypt the password of an entry. More...
 
virtual HRESULT NewDatabase ()=0
 
virtual INT OpenDatabase (LPCTSTR lpFile, PWDB_REPAIR_INFO *pRepair)=0
 
virtual INT SaveDatabase (LPCTSTR lpFile, BYTE *pWrittenDataHash32)=0
 
virtual HRESULT MoveEntry (DWORD dwGroupId, DWORD dwFrom, DWORD dwTo)=0
 
virtual BOOL MoveGroup (DWORD dwFrom, DWORD dwTo)=0
 
virtual BOOL MoveGroupEx (DWORD dwFromId, DWORD dwToId)=0
 
virtual BOOL MoveGroupExDir (DWORD dwGroupId, INT iDirection)=0
 
virtual HRESULT SortGroup (DWORD dwGroupId, DWORD dwSortByField)=0
 
virtual HRESULT SortGroupList ()=0
 
virtual DWORD Find (LPCTSTR lpFindString, BOOL bCaseSensitive, DWORD dwSearchFlags, DWORD dwStart)=0
 
virtual BOOL SetEncryptionAlgorithm (INT nAlgorithm)=0
 
virtual INT GetEncryptionAlgorithm ()=0
 
virtual DWORD GetKeyEncRounds ()=0
 
virtual HRESULT SetKeyEncRounds (DWORD dwRounds)=0
 
virtual const PW_DBHEADERGetLastDatabaseHeader ()=0
 Get the last used database header. More...
 
virtual HRESULT FixGroupTree ()=0
 Checks and corrects the group tree (level order, etc). More...
 
virtual HRESULT SubstEntryGroupIds (DWORD dwExistingId, DWORD dwNewId)=0
 
virtual HRESULT GetRawMasterKey (BYTE *pStorage)=0
 
virtual HRESULT SetRawMasterKey (const BYTE *pNewKey)=0
 
virtual HRESULT GetPropertyString (DWORD dwPropertyId, LPTSTR lpBuf, DWORD dwBufMaxChars)=0
 
virtual BOOL SetPropertyString (DWORD dwPropertyId, LPCTSTR lpValue)=0
 
virtual BOOL SetCustomKvp (LPCTSTR lpKey, LPCTSTR lpValue)=0
 Set a custom key-value pair, plugins can use this method to store own data in the database. More...
 
virtual LPCTSTR GetCustomKvp (LPCTSTR lpKey)=0
 Get a custom key-value pair, these are typically set by plugins to store own data in the database. More...
 
virtual LPCTSTR GetBackupGroupName (BOOL bTranslated)=0
 Get the name of the entry backups group. More...
 
- Public Member Functions inherited from IKpUnknown
virtual HRESULT QueryInterface (REFIID riid, void **ppvObject)=0
 COM infrastructure, provides access to all interfaces supported by this object. More...
 
virtual ULONG AddRef ()=0
 COM infrastructure, increments the reference count for this object. More...
 
virtual ULONG Release ()=0
 COM infrastructure, decrements the reference count for this object and eventually deletes it. More...
 

Detailed Description

Interface to a database handling object.

Use IKpAPI::QueryInstance to retrieve an interface to a singleton object in KeePass handling database operations.

Member Function Documentation

virtual BOOL IKpDatabase::AddEntry ( const PW_ENTRY pTemplate)
pure virtual
virtual BOOL IKpDatabase::AddGroup ( const PW_GROUP pTemplate)
pure virtual
virtual BOOL IKpDatabase::BackupEntry ( const PW_ENTRY pe,
BOOL *  pbGroupCreated 
)
pure virtual
virtual BOOL IKpDatabase::DeleteEntry ( DWORD  dwIndex)
pure virtual
virtual BOOL IKpDatabase::DeleteGroupById ( DWORD  dwGroupId,
BOOL  bCreateBackupEntries 
)
pure virtual
virtual DWORD IKpDatabase::Find ( LPCTSTR  lpFindString,
BOOL  bCaseSensitive,
DWORD  dwSearchFlags,
DWORD  dwStart 
)
pure virtual
virtual HRESULT IKpDatabase::FixGroupTree ( )
pure virtual

Checks and corrects the group tree (level order, etc).

virtual LPCTSTR IKpDatabase::GetBackupGroupName ( BOOL  bTranslated)
pure virtual

Get the name of the entry backups group.

Returns
This string is static in KeePass, do not delete it.
virtual LPCTSTR IKpDatabase::GetCustomKvp ( LPCTSTR  lpKey)
pure virtual

Get a custom key-value pair, these are typically set by plugins to store own data in the database.

Returns
This string is static in KeePass, do not delete it.
virtual INT IKpDatabase::GetEncryptionAlgorithm ( )
pure virtual
virtual PW_ENTRY* IKpDatabase::GetEntry ( DWORD  dwIndex)
pure virtual

Get an entry (by index).

Returns
The referenced object is managed by KeePass, do not delete the pointer.
virtual PW_ENTRY* IKpDatabase::GetEntryByGroup ( DWORD  dwGroupId,
DWORD  dwIndex 
)
pure virtual

Get an entry (by specifying an index of a group).

Returns
The referenced object is managed by KeePass, do not delete the pointer.
virtual DWORD IKpDatabase::GetEntryByGroupN ( DWORD  dwGroupId,
DWORD  dwIndex 
)
pure virtual
virtual PW_ENTRY* IKpDatabase::GetEntryByUuid ( const BYTE *  pUuid)
pure virtual

Get an entry (by its UUID).

Returns
The referenced object is managed by KeePass, do not delete the pointer.
virtual DWORD IKpDatabase::GetEntryByUuidN ( const BYTE *  pUuid)
pure virtual
virtual DWORD IKpDatabase::GetEntryCount ( )
pure virtual

Returns the total number of entries in database.

virtual DWORD IKpDatabase::GetEntryCountInGroup ( LPCTSTR  lpGroup)
pure virtual

Count entries in a group (identified by its name).

virtual DWORD IKpDatabase::GetEntryCountInGroupN ( DWORD  dwGroupId)
pure virtual

Count entries in a group (identified by its ID).

virtual DWORD IKpDatabase::GetEntryPosInGroup ( const PW_ENTRY pEntry)
pure virtual
virtual PW_GROUP* IKpDatabase::GetGroup ( DWORD  dwIndex)
pure virtual

Get a group (by index).

Returns
The referenced object is managed by KeePass, do not delete the pointer.
virtual PW_GROUP* IKpDatabase::GetGroupById ( DWORD  dwGroupId)
pure virtual

Get a group (by ID).

Returns
The referenced object is managed by KeePass, do not delete the pointer.
virtual DWORD IKpDatabase::GetGroupByIdN ( DWORD  dwGroupId)
pure virtual
virtual DWORD IKpDatabase::GetGroupCount ( )
pure virtual

Returns the total number of groups in database.

virtual DWORD IKpDatabase::GetGroupId ( LPCTSTR  lpGroupName)
pure virtual
virtual DWORD IKpDatabase::GetGroupIdByIndex ( DWORD  dwIndex)
pure virtual
virtual BOOL IKpDatabase::GetGroupTree ( DWORD  dwGroupId,
DWORD *  pvIndices 
)
pure virtual
virtual DWORD IKpDatabase::GetKeyEncRounds ( )
pure virtual
virtual DWORD IKpDatabase::GetLastChildGroup ( DWORD  dwParentIndex)
pure virtual
virtual const PW_DBHEADER* IKpDatabase::GetLastDatabaseHeader ( )
pure virtual

Get the last used database header.

Returns
The referenced object is managed by KeePass, do not delete the pointer.
virtual PW_ENTRY* IKpDatabase::GetLastEditedEntry ( )
pure virtual

Get the entry that was last modified.

Returns
The referenced object is managed by KeePass, do not delete the pointer.
virtual HRESULT IKpDatabase::GetPropertyString ( DWORD  dwPropertyId,
LPTSTR  lpBuf,
DWORD  dwBufMaxChars 
)
pure virtual
virtual HRESULT IKpDatabase::GetRawMasterKey ( BYTE *  pStorage)
pure virtual
virtual HRESULT IKpDatabase::InitPrimaryInstance ( )
pure virtual

Used by KeePass internally, plugins must not call this method.

virtual HRESULT IKpDatabase::LockEntryPassword ( PW_ENTRY pEntry)
pure virtual

In-memory protection: encrypt the password of an entry.

See Also
UnlockEntryPassword
virtual HRESULT IKpDatabase::MoveEntry ( DWORD  dwGroupId,
DWORD  dwFrom,
DWORD  dwTo 
)
pure virtual
virtual BOOL IKpDatabase::MoveGroup ( DWORD  dwFrom,
DWORD  dwTo 
)
pure virtual
virtual BOOL IKpDatabase::MoveGroupEx ( DWORD  dwFromId,
DWORD  dwToId 
)
pure virtual
virtual BOOL IKpDatabase::MoveGroupExDir ( DWORD  dwGroupId,
INT  iDirection 
)
pure virtual
virtual HRESULT IKpDatabase::NewDatabase ( )
pure virtual
virtual INT IKpDatabase::OpenDatabase ( LPCTSTR  lpFile,
PWDB_REPAIR_INFO pRepair 
)
pure virtual
virtual INT IKpDatabase::SaveDatabase ( LPCTSTR  lpFile,
BYTE *  pWrittenDataHash32 
)
pure virtual
virtual BOOL IKpDatabase::SetCustomKvp ( LPCTSTR  lpKey,
LPCTSTR  lpValue 
)
pure virtual

Set a custom key-value pair, plugins can use this method to store own data in the database.

virtual BOOL IKpDatabase::SetEncryptionAlgorithm ( INT  nAlgorithm)
pure virtual
virtual BOOL IKpDatabase::SetEntry ( DWORD  dwIndex,
const PW_ENTRY pTemplate 
)
pure virtual
virtual BOOL IKpDatabase::SetGroup ( DWORD  dwIndex,
const PW_GROUP pTemplate 
)
pure virtual
virtual HRESULT IKpDatabase::SetKeyEncRounds ( DWORD  dwRounds)
pure virtual
virtual INT IKpDatabase::SetMasterKey ( LPCTSTR  lpMasterKey,
BOOL  bDiskDrive,
LPCTSTR  lpSecondKey 
)
pure virtual

Set the master key for the database (will be used in the database loading / saving process).

virtual BOOL IKpDatabase::SetPropertyString ( DWORD  dwPropertyId,
LPCTSTR  lpValue 
)
pure virtual
virtual HRESULT IKpDatabase::SetRawMasterKey ( const BYTE *  pNewKey)
pure virtual
virtual HRESULT IKpDatabase::SortGroup ( DWORD  dwGroupId,
DWORD  dwSortByField 
)
pure virtual
virtual HRESULT IKpDatabase::SortGroupList ( )
pure virtual
virtual HRESULT IKpDatabase::SubstEntryGroupIds ( DWORD  dwExistingId,
DWORD  dwNewId 
)
pure virtual
virtual HRESULT IKpDatabase::UnlockEntryPassword ( PW_ENTRY pEntry)
pure virtual

In-memory protection: decrypt the password of an entry.

Passwords of all entries are by default encrypted. In order to make them readable, use this method. After you've finished using the password, immediately encrypt it again using the LockEntryPassword method.

See Also
LockEntryPassword

The documentation for this struct was generated from the following file:



Documentation generated with Doxygen.




Valid XHTML 1.0 Transitional Document

Get KeePass

Flattr this


KeePass is OSI Certified Open Source Software
Copyright © 2003-2014
Dominik Reichl, [Legal Contact / Imprint] [Disclaimer] [Acknowledgements] [Donate], Downloads hosted at

Get KeePass Password Safe at
SourceForge.net. Fast, secure and Free Open Source software downloads