202
edits
BrettWilson (talk | contribs) (→Flags) |
BrettWilson (talk | contribs) |
||
Line 47: | Line 47: | ||
== External interface == | == External interface == | ||
Preliminary IDL: | |||
* | /** | ||
* | * Sets an annotation, overwriting any previous annotation with the same | ||
* | * URL/name | ||
*/ | |||
void setAnnotation(in nsIURI aURI, in wstring aName, in nsIVariant aValue, | |||
in long aFlags, in long aExpiration); | |||
Issues: | /** | ||
* Retrieves the value of an annotation | |||
*/ | |||
nsIVariant getAnnotation(in nsIURI aURI, in wstring aName); | |||
/* | |||
* Retrieves info about the annotation. SetDate is the time that this | |||
* annotation was last set. | |||
*/ | |||
void getAnnotationInfo(in nsIURI aURI, in wstring aName, | |||
out long long aSetDate, out long aFlags, | |||
out long aExpiration); | |||
/** | |||
* Get the names of all annotations for this URI. | |||
*/ | |||
nsIArray getAnnotations(in nsIURI aURI); | |||
/** | |||
* Test for annotation existance. | |||
*/ | |||
boolean hasAnnotation(in nsIURI aURI, in wstring aName); | |||
/* | |||
* Removes a specific annotation | |||
*/ | |||
void removeAnnotation(in nsIURI aURI, in wstring aName); | |||
/** | |||
* Removes all annotations for the given page. | |||
* We may want some other similar functions to get annotations with given | |||
* flags (once we have flags defined). | |||
*/ | |||
void removePageAnnotations(in nsIURI aURI); | |||
Issues: do we want to namespace annotation names? | |||
Do we want to support more advanced queries? Examples: Give me all pages with annotation X. Give me all pages where annotation X > Y, etc. | |||
== IE's Implementation == | == IE's Implementation == |
edits