Developer

API Reference

IBTOPPClient_Pull()

Brew Release
Brew MP 1.0.2
See Also
IBTOPPClient_Cancel()
Description
Pulls the default object from an OPP server. Per Bluetooth OPP specs, the default object is the owner's business card which is an OBEX object of MIME type "text/x-vCard".
As with IBTOPPClient_Push, a connection will be brought up if one doesn't already exist. After the operation completes, whether in success or failure, connection will remain up for nIdleTimeSecs seconds. During this time application may initiate another Push or Pull operation. After the idle time, connection is brought down automatically and DISCONNECTED event will be sent to app.
Once PULL_COMPLETE event is received with success result, application can retrieve the server's default object with IPort1_Read().
The param cMinSecurity is only applicable when connection is made. It is ignored if this API is called when a connection is already present.
To cancel the Pull operation, application must call IBTOPPClient_Cancel().
Parameters
  • _me
    [in]:
    the object
  • bdAddr
    [in]:
    OPP server's BD address
  • uServerChannel
    [in]:
    server channel; 0 to indicate unknown
  • cMinSecurity
    [in]:
    minimum security level enforced on the connection;
  • nReportFreq
    [in]:
    minimum number of bytes sent between progress reports
  • nIdleTimeSecs
    [in]:
    number of seconds of idle time before connection should be torn down
  • piDestPort
    [in]:
    the Port1 object onto which data received from server will be stored
    Return
  • AEE_SUCCESS
    []:
    The operation has been scheduled, and CONNECTED, PULL_PROGRESS, and/or PULL_COMPLETE events will be generated.
  • AEE_EBADPARM
    []:
    invalid input
  • AEE_EBADSTATE
    []:
    still connected to another server, or in the middle of another operation
Interface
Prototype
   AEEResult IBTOPPClient_Pull (IBTOPPClient* _me,
                                const BDAddress* bdAddr,
                                uint8 uServerChannel,
                                BTSecurityLevel cMinSecurity,
                                int nReportFreq,
                                short int nIdleTimeSecs,
                                IPort1* piDestPort);
Side Effect
None
Comment
None
  • Follow