Class Index | File Index

Classes


Class DirectHomeRecorder


Defined in: DirectHomeRecorder.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DirectHomeRecorder(configuration)
Creates a home recorder able to save homes and its resources directly on server, in local storage or in indexedDB.
Method Summary
Method Attributes Method Name and Description
 
deleteHome(homeName, observer)
Deletes on server a home from its name.
 
Requests the available homes on server.
 
readHome(homeName, observer)
Reads a home with this recorder.
 
writeHome(home, homeName, observer)
Writes a home instance using writeHomeURL and writeResourceURL URLs in configuration.
Class Detail
DirectHomeRecorder(configuration)
Creates a home recorder able to save homes and its resources directly on server, in local storage or in indexedDB.
Author: Emmanuel Puybaret.
Parameters:
{{readHomeURL: string|writeHomeURL: string|writeResourceURL: string|readResourceURL: string|listHomesURL: string|deleteHomeURL: string|compressionLevel: number|writeHomeWithWorker: boolean }} configuration Optional
the recorder configuration
Method Detail
{abort: function} deleteHome(homeName, observer)
Deletes on server a home from its name.
Parameters:
{string} homeName
{homeDeleted: function|homeError: function} observer
Returns:
{abort: function} a function that will abort deletion or null if no deletion was performed

{abort: function} getAvailableHomes(observer)
Requests the available homes on server.
Parameters:
{availableHomes: function|homesError: function} observer
Returns:
{abort: function} a function that will abort request or null if no request was performed

readHome(homeName, observer)
Reads a home with this recorder.
Parameters:
{string} homeName
the home name on the server or the URL of the home if readHomeURL service is missing
{{homeLoaded: function|homeError: function|progression: function}} observer
callbacks used to follow the reading of the home

{abort: function} writeHome(home, homeName, observer)
Writes a home instance using writeHomeURL and writeResourceURL URLs in configuration.
Parameters:
{Home} home
saved home
{string} homeName
the home name on the server
{{homeSaved: function|homeError: function}} observer Optional
The callbacks used to follow the writing operation of the home
Returns:
{abort: function} a function that will abort writing operation if needed

© Copyright 2024 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Thu Apr 04 2024 17:30:25 GMT+0200 (CEST)