summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwmdoc.h
Side-by-side diff
Diffstat (limited to 'pwmanager/pwmanager/pwmdoc.h') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwmdoc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/pwmdoc.h b/pwmanager/pwmanager/pwmdoc.h
index 9fcdda7..45dd729 100644
--- a/pwmanager/pwmanager/pwmdoc.h
+++ b/pwmanager/pwmanager/pwmdoc.h
@@ -489,96 +489,98 @@ public:
/** edit entry */
bool editEntry(unsigned int oldCategory, const QString &newCategory,
unsigned int index, PwMDataItem *d, bool updateMeta = true);
/** finds the category with the "name" and return it's index */
bool findCategory(const QString &name, unsigned int *index);
/** search for an entry "find" and check while searching only for
* the data-fields specified by "searchIn". To set the "searchIn"
* value, we may use one or more of the SEARCH_IN_* defines at
* the top of this header-file. It returns the positions of all
* matched entries in "foundPositions". If "breakAfterFound" is true,
* the function terminates after the first occurence of the entry
* and doesn't go on searching. So foundPositions->size() is never
* > 1 if breakAfterFound is true.
*/
void findEntry(unsigned int category, PwMDataItem find, unsigned int searchIn,
vector<unsigned int> *foundPositions, bool breakAfterFound = false,
bool caseSensitive = true, bool exactWordMatch = true,
bool sortByLvp = false);
/** see the above funtion. This function allows to set the category by name. */
void findEntry(const QString &category, PwMDataItem find, unsigned int searchIn,
vector<unsigned int> *foundPositions, bool breakAfterFound = false,
bool caseSensitive = true, bool exactWordMatch = true,
bool sortByLvp = false);
/** returns number of entries */
unsigned int numEntries(const QString &category);
unsigned int numEntries(unsigned int category)
{ return dti.dta[category].d.size(); }
/** returns number of categories */
unsigned int numCategories()
{ return dti.dta.size(); }
/** returns the name of the category at "index" */
const string* getCategory(unsigned int index)
{ return (&(dti.dta[index].name)); }
/** returns the data of item at "index".
* It unlocks the entry if it's locked and unlockIfLocked is true.
* If the entry is locked, but unlockIfLocked is false, it'll not return
* the pw.
*/
bool getEntry(const QString &category, unsigned int index,
PwMDataItem *d, bool unlockIfLocked = false);
bool getEntry(unsigned int category, unsigned int index,
PwMDataItem *d, bool unlockIfLocked = false);
/** returns the comment-string by looking at the category
* and the listViewPos
*/
PwMerror getCommentByLvp(const QString &category, int listViewPos,
string *foundComment);
+ PwMerror getCommentByLvp_long(const QString &category, int listViewPos,
+ string *foundComment);
/** checks if a password is already available. (currentPw) */
bool isPwAvailable()
{ return (currentPw != ""); }
/** un/lock entry at "index". If needed, ask for password. */
bool lockAt(const QString &category, unsigned int index,
bool lock = true);
bool lockAt(unsigned int category, unsigned int index,
bool lock = true);
/** returns the lock-status at "index" */
bool isLocked(const QString &category, unsigned int index);
bool isLocked(unsigned int category, unsigned int index)
{ return dti.dta[category].d[index].lockStat; }
/** returns the deeplock status */
bool isDeepLocked()
{ return getDocStatFlag(DOC_STAT_DEEPLOCKED); }
/** (un)lock all entries */
bool lockAll(bool lock);
/** unlocks all entries tempoarly.
* 1st NOTE: Be very careful with this function! :)
* 2nd NOTE: After you have called unlockAll_Tempoary(); ,
* please DON'T forget to call unlockAll_Tempoary(true);
* _before_ the user (or someone else) is able to change
* the document!
* 3rd NOTE: Please DON'T change "dta" while the data is tempoary
* unlocked! This will cause corruption.
*/
bool unlockAll_tempoary(bool revert = false);
/** deep-(un)locks the document.
* deep-locking writes all data to the file, deletes all data
* in memory, but doesn't close the document.
* deep-locking is only available, if the user previously saved
* the doc to a file (with a password).
* If "saveToFile" is false, it does NOT write the data to the file!
*/
PwMerror deepLock(bool lock = true, bool saveToFile = true);
/** is unlockable without pw? */
bool unlockWoPw()
{ return getDocStatFlag(DOC_STAT_UNLOCK_WITHOUT_PW); }
/** get the "currentPassword" */
const QString& getCurrentPw()
{ return currentPw; }
/** open a window and request the user to change the mpw */
void changeCurrentPw();
/** set the "listViewPos" variable of "dta" */
void setListViewPos(const QString &category, unsigned int index,
int pos);
/** set the "listViewPos" variable of "dta" */
void setListViewPos(unsigned int category, unsigned int index,