590
edits
Comrade693 (talk | contribs) (→Notes and feedback on Proposal: Bookmark API Feedback (responding to philikon)) |
Comrade693 (talk | contribs) (→Detailed Proposal: History proposal) |
||
Line 296: | Line 296: | ||
==Detailed Proposal== | ==Detailed Proposal== | ||
interface nsIVisitInfo : nsISupports | |||
{ | |||
// visit id (moz_historyvisits.id) | |||
readonly long long id; | |||
readonly PRTime date; | |||
readonly long transitionType; | |||
} | |||
interface nsIPlaceInfo : nsISupports | |||
{ | |||
// place id | |||
readonly long long id; | |||
readonly nsIURI uri; | |||
readonly AString title; | |||
readonly ACString guid; | |||
/** | |||
* An array of nsIVisitInfo objects for the place. | |||
*/ | |||
readonly nsIVariant visits; | |||
} | |||
interface nsIPlaceInfoCallback : nsISupports | |||
{ | |||
/** | |||
* Called when one of the visit methods has added a visit. | |||
* | |||
* @param aResultCode | |||
* nsresult of the visit addition. Success indicated by Components.isSuccessCode(aResultCode). | |||
* @param aPlaceInfo | |||
* The information about the visit. | |||
*/ | |||
void onComplete(in nsresult aResultCode, | |||
in nsIPlaceInfo aPlaceInfo); | |||
} | |||
/** | |||
* Adds a set of visits for a place info object. The callback is called once for each visit. Ignores duplicates. Also updates the guid or title. | |||
* | |||
* @param aPlaceInfo | |||
* Information about the place to add. | |||
* @param [optional] aCallback | |||
* Callback to be notified. | |||
*/ | |||
void updatePlaceAndAddVisits(in nsIPlaceInfo aPlaceInfo, | |||
[optional] in nsIVisitInfoCallback aCallback); | |||
/** | |||
* Just like updatePlaceAndAddVisits. | |||
* | |||
* @param aPlaceInfos | |||
* Information about the places to add. | |||
* @param aPlaces | |||
* The number of aPlaceInfos. | |||
* @param [optional] aCallback | |||
* Callback to be notified. | |||
*/ | |||
void updatePlacesAndAddVisits([array, size_is(aPlaces)] in nsIPlaceInfo aPlaceInfos, | |||
in unsigned long aPlaces, | |||
[optional] in nsIVisitInfoCallback aCallback); |
edits