DigitalSpaces::DIDataResourceManager Struct Reference
[Core]

#include <Interfaces.h>

Inherits DigitalSpaces::DIObjectBase.


Detailed Description

A central point for managing access to data resources, such as local files or online URL accessed content.

Todo:
Consider a RemoveSearchPath option.

Public Member Functions

void AddSearchPath (const char *sURL)
 Adds an absolute URL to be used for expanding relative URLs.
DIDataResourceGetResource (const char *sURL)
 Returns a data resource.
void GetResourceNames (DIStringList1 *list)
 Returns the names of all the resources currently available.

Member Function Documentation

void DigitalSpaces::DIDataResourceManager::AddSearchPath ( const char *  sURL  ) 

Adds an absolute URL to be used for expanding relative URLs.

Note:
The current implementation (ResourceManager as part of DigitalSpacesCore) supports
  • Local system directories (Paths starting with a drive letter, not network paths)
  • Local system relative directories
  • HTML content (check is first character is '<' )
  • Folders containing the file file.index (for both local folders and remote folders)
When parsing HTML content (file.index should be a HTML file), the implementation looks for <a href="accessURL">ResourceName</a> . The content needs to be valid XML.
You do not need to prepend local system paths with file:// . You do need to include the drive letter.

DIDataResource* DigitalSpaces::DIDataResourceManager::GetResource ( const char *  sURL  ) 

Returns a data resource.

It will search the URLs added through AddSearchPath for a match, and if not found, attempt to open as an absolute URL.

void DigitalSpaces::DIDataResourceManager::GetResourceNames ( DIStringList1 list  ) 

Returns the names of all the resources currently available.

These are usually added by AddSearchPath, but will also include any added by GetResource with an absolute path.

Parameters:
list String List that will have the available resource names appended to it. The implementation will not clear the content of this list.


The documentation for this struct was generated from the following file:

Generated on Fri Aug 22 18:12:10 2008 for Digital Spaces by  doxygen 1.5.6