diff -r 4d198a32ac7d -r d4809db37847 plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-04095E9A-50E7-4E5F-BD6F-71DA281A0080.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-04095E9A-50E7-4E5F-BD6F-71DA281A0080.html Thu Aug 19 17:48:04 2010 -0700 @@ -0,0 +1,173 @@ + + +
Description:
+The getServiceObject
method creates an object that
+is used to access the services made available through a Service
+API. This object is referred to as a "service object".
Syntax:
+so = device.getServiceObject(provider, interface);+
Arguments:
+provider
:
This is a text string that defines the service provider name, that is, +the name of the type of service object to create.
+ +interface
:
This is a text string that defines the supported interface for the specified +service provider.
+ +
+ Service API + |
+ Provider + |
+ Interface + |
---|---|---|
+ + | +
+
|
+
+
|
+
+ + | +
+
|
+
+
|
+
+ + | +
+
|
+
+
|
+
+ + | +
+
|
+
+
|
+
+ + | +
+
|
+
+
|
+
+ + | +
+
|
+
+
|
+
+ + | +
+
|
+
+
|
+
+ + | +
+
|
+
+
|
+
+ + | +
+
|
+
+
|
+
+ + | +
+
|
+
+
|
+
Return value:
+If the call succeeds, the getServiceObject
method
+returns a service object; otherwise it returns undefined
.
Remarks:
+The getServiceObject
method is a factory
+method found on the device
object.
To ensure backward compatibility, always check in your JavaScript
+code that the device
object exists before calling the getServiceObject
method.
+For example:
if (device != "undefined") + device.getServiceObject("Service.MediaManagement", "IDataSource"); ++ +
Example code:
+The following example creates a service object for the Media +Management Service API:
+var so = device.getServiceObject("Service.MediaManagement", "IDataSource");+