00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00045 #include "nsISupports.idl"
00046 #include "nsIArray.idl"
00047 #include "nsIURI.idl"
00048
00049 interface nsIFile;
00050 interface nsINavHistoryContainerResultNode;
00051 interface nsINavHistoryQueryResultNode;
00052 interface nsINavHistoryQuery;
00053 interface nsINavHistoryQueryOptions;
00054 interface nsINavHistoryResult;
00055 interface nsINavHistoryBatchCallback;
00056 interface nsITreeColumn;
00057 interface nsIWritablePropertyBag;
00058
00059 [scriptable, uuid(47cf89e3-4777-46bf-9677-21793870ce62)]
00060 interface nsINavHistoryResultNode : nsISupports
00061 {
00066 readonly attribute nsINavHistoryContainerResultNode parent;
00067
00071 readonly attribute nsINavHistoryResult parentResult;
00072
00079 readonly attribute AUTF8String uri;
00080
00085 const unsigned long RESULT_TYPE_URI = 0;
00086 const unsigned long RESULT_TYPE_VISIT = 1;
00087 const unsigned long RESULT_TYPE_FULL_VISIT = 2;
00088 const unsigned long RESULT_TYPE_DYNAMIC_CONTAINER = 4;
00089 const unsigned long RESULT_TYPE_QUERY = 5;
00090 const unsigned long RESULT_TYPE_FOLDER = 6;
00091 const unsigned long RESULT_TYPE_SEPARATOR = 7;
00092 const unsigned long RESULT_TYPE_FOLDER_SHORTCUT = 9;
00093 readonly attribute unsigned long type;
00094
00098 readonly attribute AUTF8String title;
00099
00106 readonly attribute unsigned long accessCount;
00107
00123 readonly attribute PRTime time;
00124
00135 readonly attribute nsIURI icon;
00136
00143 readonly attribute long indentLevel;
00144
00155 attribute long viewIndex;
00156
00162 readonly attribute nsIWritablePropertyBag propertyBag;
00163
00170 readonly attribute long bookmarkIndex;
00171
00177 readonly attribute long long itemId;
00178
00183 readonly attribute PRTime dateAdded;
00184
00189 readonly attribute PRTime lastModified;
00190
00195 readonly attribute AString tags;
00196 };
00197
00198
00204 [scriptable, uuid(8e2c5a86-b33d-4fa6-944b-559af7e95fcd)]
00205 interface nsINavHistoryVisitResultNode : nsINavHistoryResultNode
00206 {
00211 readonly attribute long long sessionId;
00212 };
00213
00214
00220 [scriptable, uuid(c49fd9d5-56e2-43eb-932c-f933f28cba85)]
00221 interface nsINavHistoryFullVisitResultNode : nsINavHistoryVisitResultNode
00222 {
00226 readonly attribute long long visitId;
00227
00232 readonly attribute long long referringVisitId;
00233
00238 readonly attribute long transitionType;
00239 };
00240
00241
00247 [scriptable, uuid(f9c8e1c1-e701-44ad-893c-8504c3956929)]
00248 interface nsINavHistoryContainerResultNode : nsINavHistoryResultNode
00249 {
00250
00261 attribute boolean containerOpen;
00262
00272 readonly attribute boolean hasChildren;
00273
00281 readonly attribute unsigned long childCount;
00282 nsINavHistoryResultNode getChild(in unsigned long aIndex);
00283
00291 readonly attribute boolean childrenReadOnly;
00292
00293
00294
00295
00301 readonly attribute AUTF8String dynamicContainerType;
00302
00310 nsINavHistoryResultNode appendURINode(
00311 in AUTF8String aURI, in AUTF8String aTitle, in PRUint32 aAccessCount,
00312 in PRTime aTime, in AUTF8String aIconURI);
00313
00323
00324
00325
00326
00336
00337
00338
00339
00340
00341
00355
00356
00357
00358
00369
00370
00371
00380 nsINavHistoryContainerResultNode appendFolderNode(in PRInt64 aFolderId);
00381
00390
00391 };
00392
00393
00401 [scriptable, uuid(ea17745a-1852-4155-a98f-d1dd1763b3df)]
00402 interface nsINavHistoryQueryResultNode : nsINavHistoryContainerResultNode
00403 {
00408 void getQueries(out unsigned long queryCount,
00409 [retval,array,size_is(queryCount)] out nsINavHistoryQuery queries);
00410
00415 readonly attribute nsINavHistoryQueryOptions queryOptions;
00416
00421 readonly attribute long long folderItemId;
00422 };
00423
00424
00432 [scriptable, uuid(e60f4429-3787-45c8-a8c0-18ef52621bbf)]
00433 interface nsINavHistoryResultViewer : nsISupports
00434 {
00440 void itemInserted(in nsINavHistoryContainerResultNode aParent,
00441 in nsINavHistoryResultNode aItem,
00442 in unsigned long aNewIndex);
00443
00450 void itemRemoved(in nsINavHistoryContainerResultNode aParent,
00451 in nsINavHistoryResultNode aItem,
00452 in unsigned long aOldIndex);
00453
00463 void itemMoved(in nsINavHistoryResultNode aItem,
00464 in nsINavHistoryContainerResultNode aOldParent,
00465 in unsigned long aOldIndex,
00466 in nsINavHistoryContainerResultNode aNewParent,
00467 in unsigned long aNewIndex);
00468
00476 void itemChanged(in nsINavHistoryResultNode item);
00477
00482 void itemReplaced(in nsINavHistoryContainerResultNode parent,
00483 in nsINavHistoryResultNode oldItem,
00484 in nsINavHistoryResultNode newItem,
00485 in unsigned long index);
00486
00490 void containerOpened(in nsINavHistoryContainerResultNode item);
00491
00497 void containerClosed(in nsINavHistoryContainerResultNode item);
00498
00503 void invalidateContainer(in nsINavHistoryContainerResultNode item);
00504
00509 void invalidateAll();
00510
00523 void sortingChanged(in unsigned short sortingMode);
00524
00530 attribute nsINavHistoryResult result;
00531 };
00532
00533
00543 [scriptable, uuid(fa77e4e9-9fc8-45d2-9507-0fe4f0602505)]
00544 interface nsINavHistoryResultTreeViewer : nsINavHistoryResultViewer
00545 {
00550 nsINavHistoryResultNode nodeForTreeIndex(in unsigned long aIndex);
00551
00564 const unsigned long INDEX_INVISIBLE = 0xffffffff;
00565 unsigned long treeIndexForNode(in nsINavHistoryResultNode aNode);
00566 };
00567
00568
00587 [scriptable, uuid(d1562f6f-8d5a-4042-8524-72f747a51b18)]
00588 interface nsINavHistoryResult : nsISupports
00589 {
00596 attribute unsigned short sortingMode;
00597
00602 attribute AUTF8String sortingAnnotation;
00603
00611 attribute nsINavHistoryResultViewer viewer;
00612
00617 readonly attribute nsINavHistoryContainerResultNode root;
00618 };
00619
00620
00628 [scriptable, uuid(eacb76eb-3eeb-419b-a963-9b3a9d65f356)]
00629 interface nsINavHistoryObserver : nsISupports
00630 {
00635 void onBeginUpdateBatch();
00636
00641 void onEndUpdateBatch();
00642
00662 void onVisit(in nsIURI aURI, in long long aVisitID, in PRTime aTime,
00663 in long long aSessionID, in long long aReferringID,
00664 in unsigned long aTransitionType, out unsigned long aAdded);
00665
00680 void onTitleChanged(in nsIURI aURI, in AString aPageTitle);
00681
00692 void onDeleteURI(in nsIURI aURI);
00693
00697 void onClearHistory();
00698
00703 const unsigned long ATTRIBUTE_FAVICON = 3;
00704 void onPageChanged(in nsIURI aURI, in unsigned long aWhat, in AString aValue);
00705
00718 void onPageExpired(in nsIURI aURI, in PRTime aVisitTime, in boolean aWholeEntry);
00719 };
00720
00721
00732 [scriptable, uuid(53B51AFE-9DE8-40AD-9C81-F2CC1701F1FF)]
00733 interface nsINavHistoryQuery : nsISupports
00734 {
00759 const unsigned long TIME_RELATIVE_EPOCH = 0;
00760 const unsigned long TIME_RELATIVE_TODAY = 1;
00761 const unsigned long TIME_RELATIVE_NOW = 2;
00762
00763 attribute PRTime beginTime;
00764 attribute unsigned long beginTimeReference;
00765 readonly attribute boolean hasBeginTime;
00766 readonly attribute PRTime absoluteBeginTime;
00767
00768 attribute PRTime endTime;
00769 attribute unsigned long endTimeReference;
00770 readonly attribute boolean hasEndTime;
00771 readonly attribute PRTime absoluteEndTime;
00772
00776 attribute AString searchTerms;
00777 readonly attribute boolean hasSearchTerms;
00778
00784 attribute long minVisits;
00785 attribute long maxVisits;
00786
00791 attribute boolean onlyBookmarked;
00792
00797 attribute boolean domainIsHost;
00798
00809 attribute AUTF8String domain;
00810 readonly attribute boolean hasDomain;
00811
00818 attribute boolean uriIsPrefix;
00819
00824 attribute nsIURI uri;
00825 readonly attribute boolean hasUri;
00826
00840 attribute boolean annotationIsNot;
00841 attribute AUTF8String annotation;
00842 readonly attribute boolean hasAnnotation;
00843
00847 void getFolders(out unsigned long count,
00848 [retval,array,size_is(count)] out long long folders);
00849 readonly attribute unsigned long folderCount;
00850
00856 void setFolders([const,array, size_is(folderCount)] in long long folders,
00857 in unsigned long folderCount);
00858
00862 nsINavHistoryQuery clone();
00863 };
00864
00868 [scriptable, uuid(a46c132e-35f3-4e1e-bb3d-4e3043657248)]
00869 interface nsINavHistoryQueryOptions : nsISupports
00870 {
00881 const unsigned short SORT_BY_NONE = 0;
00882 const unsigned short SORT_BY_TITLE_ASCENDING = 1;
00883 const unsigned short SORT_BY_TITLE_DESCENDING = 2;
00884 const unsigned short SORT_BY_DATE_ASCENDING = 3;
00885 const unsigned short SORT_BY_DATE_DESCENDING = 4;
00886 const unsigned short SORT_BY_URI_ASCENDING = 5;
00887 const unsigned short SORT_BY_URI_DESCENDING = 6;
00888 const unsigned short SORT_BY_VISITCOUNT_ASCENDING = 7;
00889 const unsigned short SORT_BY_VISITCOUNT_DESCENDING = 8;
00890 const unsigned short SORT_BY_KEYWORD_ASCENDING = 9;
00891 const unsigned short SORT_BY_KEYWORD_DESCENDING = 10;
00892 const unsigned short SORT_BY_DATEADDED_ASCENDING = 11;
00893 const unsigned short SORT_BY_DATEADDED_DESCENDING = 12;
00894 const unsigned short SORT_BY_LASTMODIFIED_ASCENDING = 13;
00895 const unsigned short SORT_BY_LASTMODIFIED_DESCENDING = 14;
00896 const unsigned short SORT_BY_TAGS_ASCENDING = 17;
00897 const unsigned short SORT_BY_TAGS_DESCENDING = 18;
00898 const unsigned short SORT_BY_ANNOTATION_ASCENDING = 19;
00899 const unsigned short SORT_BY_ANNOTATION_DESCENDING = 20;
00900
00901
00906 const unsigned short RESULTS_AS_URI = 0;
00907
00913 const unsigned short RESULTS_AS_VISIT = 1;
00914
00921 const unsigned short RESULTS_AS_FULL_VISIT = 2;
00922
00928 const unsigned short RESULTS_AS_DATE_QUERY = 3;
00929
00935 const unsigned short RESULTS_AS_SITE_QUERY = 4;
00936
00942 const unsigned short RESULTS_AS_DATE_SITE_QUERY = 5;
00943
00950 const unsigned short RESULTS_AS_TAG_QUERY = 6;
00951
00958 const unsigned short RESULTS_AS_TAG_CONTENTS = 7;
00959
00964 attribute unsigned short sortingMode;
00965
00969 attribute AUTF8String sortingAnnotation;
00970
00975 attribute unsigned short resultType;
00976
00983 attribute boolean excludeItems;
00984
00990 attribute boolean excludeQueries;
00991
01000 attribute boolean excludeReadOnlyFolders;
01001
01009 attribute AUTF8String excludeItemIfParentHasAnnotation;
01010
01021 attribute boolean expandQueries;
01022
01030 attribute boolean includeHidden;
01031
01036 attribute boolean showSessions;
01037
01050 attribute unsigned long maxResults;
01051
01052 const unsigned short QUERY_TYPE_HISTORY = 0;
01053 const unsigned short QUERY_TYPE_BOOKMARKS = 1;
01054 const unsigned short QUERY_TYPE_UNIFIED = 2;
01055
01060 attribute unsigned short queryType;
01061
01065 nsINavHistoryQueryOptions clone();
01066 };
01067
01068 [scriptable, uuid(437f539b-d541-4a0f-a200-6f9a6d45cce2)]
01069 interface nsINavHistoryService : nsISupports
01070 {
01085 const unsigned long TRANSITION_LINK = 1;
01086
01093 const unsigned long TRANSITION_TYPED = 2;
01094
01099 const unsigned long TRANSITION_BOOKMARK = 3;
01100
01107 const unsigned long TRANSITION_EMBED = 4;
01108
01112 const unsigned long TRANSITION_REDIRECT_PERMANENT = 5;
01113
01117 const unsigned long TRANSITION_REDIRECT_TEMPORARY = 6;
01118
01122 const unsigned long TRANSITION_DOWNLOAD = 7;
01123
01127 const unsigned short DATABASE_STATUS_OK = 0;
01128
01132 const unsigned short DATABASE_STATUS_CREATE = 1;
01133
01137 const unsigned short DATABASE_STATUS_CORRUPT = 2;
01138
01142 const unsigned short DATABASE_STATUS_UPGRADED = 3;
01143
01147 readonly attribute unsigned short databaseStatus;
01148
01155 readonly attribute boolean hasHistoryEntries;
01156
01160 AString getPageTitle(in nsIURI aURI);
01161
01169 void markPageAsFollowedBookmark(in nsIURI aURI);
01170
01178 AString getCharsetForURI(in nsIURI aURI);
01179
01188 void setCharsetForURI(in nsIURI aURI, in AString aCharset);
01189
01197 boolean canAddURI(in nsIURI aURI);
01198
01222 long long addVisit(in nsIURI aURI, in PRTime aTime,
01223 in nsIURI aReferringURI, in long aTransitionType,
01224 in boolean aIsRedirect, in long long aSessionID);
01225
01230 nsINavHistoryQuery getNewQuery();
01231
01236 nsINavHistoryQueryOptions getNewQueryOptions();
01237
01241 nsINavHistoryResult executeQuery(in nsINavHistoryQuery aQuery,
01242 in nsINavHistoryQueryOptions options);
01243
01249 nsINavHistoryResult executeQueries(
01250 [array,size_is(aQueryCount)] in nsINavHistoryQuery aQueries,
01251 in unsigned long aQueryCount,
01252 in nsINavHistoryQueryOptions options);
01253
01260 void queryStringToQueries(in AUTF8String aQueryString,
01261 [array, size_is(aResultCount)] out nsINavHistoryQuery aQueries,
01262 out unsigned long aResultCount,
01263 out nsINavHistoryQueryOptions options);
01264
01269 AUTF8String queriesToQueryString(
01270 [array, size_is(aQueryCount)] in nsINavHistoryQuery aQueries,
01271 in unsigned long aQueryCount,
01272 in nsINavHistoryQueryOptions options);
01273
01280 void addObserver(in nsINavHistoryObserver observer, in boolean ownsWeak);
01281
01285 void removeObserver(in nsINavHistoryObserver observer);
01286
01297 void runInBatchMode(in nsINavHistoryBatchCallback aCallback,
01298 in nsISupports aClosure);
01299
01304 readonly attribute boolean historyDisabled;
01305
01310 void importHistory(in nsIFile file);
01311 };
01312
01316 [scriptable, uuid(5143f2bb-be0a-4faf-9acb-b0ed3f82952c)]
01317 interface nsINavHistoryBatchCallback : nsISupports {
01318 void runBatched(in nsISupports aUserData);
01319 };