26 #ifndef SBDEVICEXMLCAPABILITIES_H_
27 #define SBDEVICEXMLCAPABILITIES_H_
30 #include <nsStringAPI.h>
31 #include <sbIDevice.h>
36 class sbIDevCapVideoFormatType;
40 class nsIMutableArray;
89 nsIDOMNode* aDeviceCapsRootNode,
104 const char* aXMLCapabilitiesSpec,
105 PRBool* aAddedCapabilities = nsnull,
120 nsIDOMNode* aDeviceCapsRootNode,
121 PRBool* aAddedCapabilities = nsnull,
126 nsCOMPtr<nsIDOMElement> mRootElement;
127 PRBool mHasCapabilities;
133 nsresult AddFunctionType(PRUint32 aFunctionType);
140 nsresult AddContentType(PRUint32 aFunctionType,
141 PRUint32 aContentType);
148 nsresult AddMimeType(PRUint32 aContentType,
149 nsAString
const & aMimeType);
155 nsresult ProcessCapabilities(nsIDOMNode* aRootNode);
161 nsresult ProcessDeviceCaps(nsIDOMNode * aDevCapNode);
167 nsresult ProcessAudio(nsIDOMNode * aAudioNode);
174 nsresult ProcessImageSizes(nsIDOMNode * aImageSizeNode,
175 nsIMutableArray * aImageSizes);
181 nsresult ProcessImage(nsIDOMNode * aImageNode);
187 nsresult ProcessVideo(nsIDOMNode * aVideoNode);
196 ProcessVideoStream(nsIDOMNode* aVideoStreamNode,
206 ProcessAudioStream(nsIDOMNode* aAudioStreamNode,
214 ProcessVideoFormat(nsIDOMNode* aDOMNode);
220 nsresult ProcessPlaylist(nsIDOMNode * aPlaylistNode);
229 nsresult DeviceMatchesCapabilitiesNode(nsIDOMNode * aCapabilitiesNode,
230 PRBool * aDeviceMatches);
240 nsresult DeviceMatchesDeviceNode(nsIDOMNode * aDeviceNode,
241 nsIPropertyBag2 * aDeviceProperties,
242 PRBool * aDeviceMatches);
252 nsresult GetFirstChildByTagName(nsIDOMNode* aNode,
253 const char* aTagName,
254 nsIDOMNode** aChildNode);
[UNIMPLEMENTED UNTIL AFTER 0.3]
nsresult Read(sbIDeviceCapabilities *aCapabilities)
~sbDeviceXMLCapabilities()
_collectFormDataForFrame aDocument
sbDeviceXMLCapabilities(nsIDOMElement *aRootElement, sbIDevice *aDevice=nsnull)
static nsresult AddCapabilities(sbIDeviceCapabilities *aCapabilities, const char *aXMLCapabilitiesSpec, PRBool *aAddedCapabilities=nsnull, sbIDevice *aDevice=nsnull)
static nsresult GetCapabilities(sbIDeviceCapabilities **aCapabilities, nsIDOMDocument *aDocument, sbIDevice *aDevice=nsnull)