Bug 325812 r=annie.sullivan Add annotation Int64, remove variant functions.
Original committer: brettw%gmail.com Original revision: 1.6 Original date: 2006/02/07 22:57:56 git-svn-id: svn://10.0.0.236/trunk@202793 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
c05a719d19
commit
cdc8b0f1e2
@ -108,36 +108,37 @@ interface nsIAnnotationService : nsISupports
|
|||||||
* service, but are special cased in the protocol handler so they look like
|
* service, but are special cased in the protocol handler so they look like
|
||||||
* annotations. Do not set favicons using this service.
|
* annotations. Do not set favicons using this service.
|
||||||
*/
|
*/
|
||||||
void setAnnotation(in nsIURI aURI, in AUTF8String aName, in nsIVariant aValue,
|
|
||||||
in PRInt32 aFlags, in PRInt32 aExpiration);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets an annotation just like setAnnotation, but takes a string as
|
|
||||||
* input, which will be more convenient for C++.
|
|
||||||
*/
|
|
||||||
void setAnnotationString(in nsIURI aURI, in AUTF8String aName,
|
void setAnnotationString(in nsIURI aURI, in AUTF8String aName,
|
||||||
in AString aValue, in PRInt32 aFlags,
|
in AString aValue, in PRInt32 aFlags,
|
||||||
in PRInt32 aExpiration);
|
in PRInt32 aExpiration);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets an annotation just like setAnnotation, but takes an Int32 as input
|
* Sets an annotation just like setAnnotationString, but takes an Int32 as
|
||||||
* for convenience.
|
* input.
|
||||||
*/
|
*/
|
||||||
void setAnnotationInt32(in nsIURI aURI, in AUTF8String aName,
|
void setAnnotationInt32(in nsIURI aURI, in AUTF8String aName,
|
||||||
in PRInt32 aValue, in PRInt32 aFlags,
|
in PRInt32 aValue, in PRInt32 aFlags,
|
||||||
in PRInt32 aExpiration);
|
in PRInt32 aExpiration);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets an annotation just like setAnnotation, but takes an Int64 as input
|
* Sets an annotation just like setAnnotationString, but takes an Int64 as
|
||||||
* for convenience.
|
* input.
|
||||||
*/
|
*/
|
||||||
void setAnnotationInt64(in nsIURI aURI, in AUTF8String aName,
|
void setAnnotationInt64(in nsIURI aURI, in AUTF8String aName,
|
||||||
in PRInt64 aValue, in PRInt32 aFlags,
|
in PRInt64 aValue, in PRInt32 aFlags,
|
||||||
in PRInt32 aExpiration);
|
in PRInt32 aExpiration);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets an annotation just like setAnnotationString, but takes a double as
|
||||||
|
* input.
|
||||||
|
*/
|
||||||
|
void setAnnotationDouble(in nsIURI aURI, in AUTF8String aName,
|
||||||
|
in double aValue, in PRInt32 aFlags,
|
||||||
|
in PRInt32 aExpiration);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sets an annotation just like setAnnotation, but takes binary data as
|
* Sets an annotation just like setAnnotationString, but takes binary data
|
||||||
* input. You MUST supply a valid MIME type.
|
* as input. You MUST supply a valid MIME type.
|
||||||
*/
|
*/
|
||||||
void setAnnotationBinary(in nsIURI aURI, in AUTF8String aName,
|
void setAnnotationBinary(in nsIURI aURI, in AUTF8String aName,
|
||||||
[const,array,size_is(aDataLen)] in octet aData,
|
[const,array,size_is(aDataLen)] in octet aData,
|
||||||
@ -145,34 +146,41 @@ interface nsIAnnotationService : nsISupports
|
|||||||
in PRInt32 aFlags, in PRInt32 aExpiration);
|
in PRInt32 aFlags, in PRInt32 aExpiration);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the value of an existing annotation. Throws if the annotation
|
* Retrieves the string value of a given annotation. Throws an error if the
|
||||||
* does not exist.
|
* annotation does not exist. If the annotation was set as a different
|
||||||
*/
|
* type than you are retrieving it as, the value will be converted as best
|
||||||
nsIVariant getAnnotation(in nsIURI aURI, in AUTF8String aName);
|
* as we can. You aren't always guaranteed a good conversion, however,
|
||||||
|
* and errors will not be thrown in this case. (For example, doubles will
|
||||||
/**
|
* lose precision when stringified.)
|
||||||
* Same as getAnnotation but a convenience function for C++ for strings.
|
|
||||||
*/
|
*/
|
||||||
AString getAnnotationString(in nsIURI aURI, in AUTF8String aName);
|
AString getAnnotationString(in nsIURI aURI, in AUTF8String aName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Same as getAnnotation but a convenience function for C++ for ints. If
|
* Same as getAnnotationString but for ints. If the value doesn't look like
|
||||||
* the value doesn't look like an int, returns 0. (this is current sqlite
|
* an int, returns 0. (this is current sqlite behavior when asking for an
|
||||||
* behavior when asking for an int when there is not one, it will likely
|
* int when there is not one, it will possibly change in the future if we
|
||||||
* change in the future if we start caching stuff).
|
* start caching stuff).
|
||||||
*/
|
*/
|
||||||
PRInt32 getAnnotationInt32(in nsIURI aURI, in AUTF8String aName);
|
PRInt32 getAnnotationInt32(in nsIURI aURI, in AUTF8String aName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Same as getAnnotation but a convenience function for C++ for int64s. If
|
* Same as getAnnotationString for Int64s. If the value doesn't look like
|
||||||
* the value doesn't look like an int, returns 0. (this is current sqlite
|
* an int, returns 0. (this is current sqlite behavior when asking for an
|
||||||
* behavior when asking for an int when there is not one, it will likely
|
* int when there is not one, it will possibly change in the future if we
|
||||||
* change in the future if we start caching stuff).
|
* start caching stuff).
|
||||||
*/
|
*/
|
||||||
PRInt64 getAnnotationInt64(in nsIURI aURI, in AUTF8String aName);
|
PRInt64 getAnnotationInt64(in nsIURI aURI, in AUTF8String aName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Same as getAnnotation but for binary data. This also returns the
|
* Same as getAnnotationString but returns a double-precision float. If the
|
||||||
|
* value doesn't look like an float, returns 0. (this is current sqlite
|
||||||
|
* behavior when asking for an number when there is not one, it will
|
||||||
|
* possibly change in the future if we start caching stuff).
|
||||||
|
*/
|
||||||
|
double getAnnotationDouble(in nsIURI aURI, in AUTF8String aName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Same as getAnnotationString but for binary data. This also returns the
|
||||||
* MIME type.
|
* MIME type.
|
||||||
*/
|
*/
|
||||||
void getAnnotationBinary(in nsIURI aURI, in AUTF8String aName,
|
void getAnnotationBinary(in nsIURI aURI, in AUTF8String aName,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user