27 #ifndef _SB_DEVICE_XML_INFO_H_
28 #define _SB_DEVICE_XML_INFO_H_
53 #include <sbIDevice.h>
58 #include <nsIDOMDocument.h>
59 #include <nsIDOMElement.h>
60 #include <nsStringAPI.h>
71 #define SB_DEVICE_INFO_NS "http://songbirdnest.com/deviceinfo/1.0"
176 nsresult
Read(
const char* aDeviceXMLInfoSpecList,
177 const char* aExtensionsList = nsnull);
193 nsresult
Read(nsIURI * aDeviceXMLInfoURI,
194 const nsAString & aExtensionsList);
210 nsresult
Read(nsIFile * aDeviceXMLInfoFile,
211 const nsAString & aExtensionsList);
219 nsresult
Read(nsIInputStream * aDeviceXMLInfoStream);
227 nsresult
Read(nsIDOMDocument* aDeviceXMLInfoDocument);
263 nsAString& aFolderURL);
275 nsAString& aFolderURL);
379 nsString mDeviceInfoVersion;
380 nsCOMPtr<nsIDOMElement> mDeviceInfoElement;
381 nsCOMPtr<nsIDOMElement> mDeviceElement;
400 nsresult DeviceMatchesDeviceInfoNode(nsIDOMNode* aDeviceInfoNode,
401 nsAString & aFoundVersion,
402 nsIDOMNode** aDeviceNode);
412 nsresult GetDeviceInfoVersion(nsIDOMElement * aDeviceInfoElement,
413 nsAString & aVersion);
424 nsresult DeviceMatchesDeviceNode(nsIDOMNode* aDeviceNode,
425 nsIPropertyBag2* aDeviceProperties,
426 PRBool* aDeviceMatches);
441 nsresult GetDeviceInfoNodes(
const nsAString& aNameSpace,
442 const nsAString& aTagName,
443 nsTArray< nsCOMPtr<nsIDOMNode> >& aNodeList);
457 nsresult GetDeviceInfoNodes(
const nsAString& aTagName,
458 nsTArray< nsCOMPtr<nsIDOMNode> >& aNodeList);
471 nsresult IsDeviceNodeDescendant(nsIDOMNode* aNode,
472 PRBool* aIsDeviceNodeDescendant);
480 void Log(
const char * aFmt, ...);
485 void LogIfFailed(nsresult aRV,
const char * aPrintf, ...);
490 void LogArgs(
const char * aFmt, va_list aArgs);
494 #endif // _SB_DEVICE_XML_INFO_H_
nsresult Read(const char *aDeviceXMLInfoSpecList, const char *aExtensionsList=nsnull)
nsresult GetStorageDeviceInfoList(nsIArray **aStorageDeviceInfoList)
nsresult GetDeviceInfoElement(nsIDOMElement **aDeviceInfoElement)
nsresult GetDeviceIcon(nsAString &aDeviceIconURL)
nsresult GetDeviceFolder(const nsAString &aFolderType, nsAString &aFolderURL)
sbDeviceXMLInfo(sbIDevice *aDevice=nsnull)
nsresult GetDefaultName(nsAString &aDefaultName)
nsresult GetDeviceInfoPresent(PRBool *aDeviceInfoPresent)
virtual ~sbDeviceXMLInfo()
static nsCString GetDeviceIdentifier(sbIDevice *aDevice)
nsresult GetOnlyMountMediaFolders(PRBool *aOnlyMountMediaFolders)
nsresult GetDoesDeviceSupportReformat(PRBool *aOutSupportsReformat)
nsresult GetMountTimeout(PRUint32 *aMountTimeout)
nsresult GetImportRules(nsIArray **aImportRules)
nsresult GetExcludedFolders(nsAString &aExcludedFolders)