Developer

API Reference

IBTOPPClient_PushBytes()

Brew Release
Brew MP 1.0.2
See Also
IBTOPPClient_Cancel()
Description
Pushes an object to a given OPP server. 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.
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 PushBytes 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
  • pszType
    [in]:
    MIME type of OPP object (vCard, vCal,...)
  • pwObjName
    [in]:
    name of object, empty string indicates no name
  • byteArray
    [in]:
    the data to be sent to OPP server
  • byteArrayLen
    [in]:
    number of bytes of data
    Return
  • AEE_SUCCESS
    []:
    The command has been scheduled, and CONNECTED, PUSH_PROGRESS, and/or PUSH_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_PushBytes (IBTOPPClient* _me, 
                                     const BDAddress* bdAddr,
                                     uint8 uServerChannel,
                                     BTSecurityLevel cMinSecurity,
                                     int nReportFreq,
                                     short int nIdleTimeSecs,
                                     const char* pszType, 
                                     const _wchar_t* pwObjName, 
                                     const uint8* byteArray,
                                     int byteArrayLen);
Side Effect
None
Comment
None
  • Follow