Make bookmark and history views update dynamically (bug 317826 and 317827), r=brettw.

Original committer: bryner%brianryner.com
Original revision: 1.11
Original date: 2005/12/09 23:48:44
This commit is contained in:
benjamin%smedbergs.us 2006-07-18 15:04:47 +00:00
Родитель 4e15337657
Коммит f59d32ea6e
1 изменённых файлов: 25 добавлений и 6 удалений

Просмотреть файл

@ -62,10 +62,32 @@ public:
return sInstance;
}
// Creates a new result node for the given folder.
// The query and options are cloned, and the folder's id is set on the
// new node's query.
nsresult ResultNodeForFolder(PRInt64 aFolder,
nsINavHistoryQuery *aQuery,
nsINavHistoryQueryOptions *aOptions,
nsNavHistoryResultNode **aNode);
// Fills in a ResultNode for a folder, using the given result row.
// The node's type and queries must already be set.
nsresult FillFolderNode(mozIStorageValueArray *aRow,
nsNavHistoryResultNode *aNode);
// Find all the children of a folder, using the given query and options.
// For each child, a ResultNode is created and added to |children|.
// The results are ordered by folder position.
nsresult QueryFolderChildren(nsINavHistoryQuery *aQuery,
nsINavHistoryQueryOptions *aOptions,
nsCOMArray<nsNavHistoryResultNode> *children);
// Returns a statement to get information about a folder id
mozIStorageStatement* DBGetFolderInfo() { return mDBGetFolderInfo; }
// constants for the above statement
static const PRInt32 kGetFolderInfoIndex_FolderID;
static const PRInt32 kGetFolderInfoIndex_Title;
private:
static nsNavBookmarks *sInstance;
@ -79,10 +101,6 @@ private:
nsresult AdjustIndices(PRInt64 aFolder,
PRInt32 aStartIndex, PRInt32 aEndIndex,
PRInt32 aDelta);
nsresult ResultNodeForFolder(PRInt64 aFolder,
nsINavHistoryQuery *aQuery,
nsINavHistoryQueryOptions *aOptions,
nsNavHistoryResultNode **aNode);
PRInt32 FolderCount(PRInt64 aFolder);
// remove me when there is better query initialization
@ -100,8 +118,6 @@ private:
PRInt32 mBatchLevel;
nsCOMPtr<mozIStorageStatement> mDBGetFolderInfo; // kGetFolderInfoIndex_* results
static const PRInt32 kGetFolderInfoIndex_FolderID;
static const PRInt32 kGetFolderInfoIndex_Title;
nsCOMPtr<mozIStorageStatement> mDBGetChildren; // kGetInfoIndex_* results + kGetChildrenIndex_* results
nsCOMPtr<mozIStorageStatement> mDBGetFolderChildren;
@ -118,6 +134,9 @@ private:
nsCOMPtr<mozIStorageStatement> mDBFolderCount;
nsCOMPtr<mozIStorageStatement> mDBIndexOfItem;
nsCOMPtr<mozIStorageStatement> mDBIndexOfFolder;
nsCOMPtr<nsIStringBundle> mBundle;
// in nsBookmarksHTML