Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The IObexDevice::Getmethod is used to obtain a file from the server. In a typical multi-step Getoperation, the client sends a Getrequest that may include a Name header. The server responds with a continue 0x90 code and headers describing the name and size of the pending object. After receiving this code, the client sends another Getrequest with a final bit set. The server responds with a response packet containing more headers along with another continue response code. The client continues to issue Getrequests until the final body of information arrives in an EndOfBody header and the response code is 0xA0, meaning success.
Hardware and Software Assumptions
You have declared pointers to the following interfaces:
-
IObex:IUnknown. Used for the OBEX services.
-
IHeaderCollection:IUnknown. Used to create header collections.
-
IObexDevice:IUnknown. Used to execute common operations.
-
IStream.
Used to manage data streams between devices.
Steps
Step | Topic |
---|---|
1. Enable the client to discover an OBEX device by using IConnectionPointContainerand IObexSink:IUnknowninterfaces. |
|
2. Retrieve the IObexDevicereference. |
None. |
3. Call the appropriate method of the IHeaderCollectioninterface to add a header.
|
None. |
4. Call the IObexDevice::Connectmethod on the IObexDevicereference to connect to an OBEX server. |
|
5. Call Geton the IObexDevicereference to return a header. This method returns a pointer to IStream. |
|
6. Call IStream::Readto retrieve the header information. |
|
7. Close the connection to the OBEX server by calling the IObexDevice::Disconnecton the IObexDevicereference. |
|
8. Release all interfaces and allocated resources.
|
None. |