Em vào trang chính của sonyericsson thấy có đăng tin này,nhưng mù tiếng anh😁 nên ko biết có liên quan tới vụ "bluetooth của UIQ 3.0" hay không?bác nào giỏi tiếng anh thì giúp em nhé cám ơn các bác nhiều😃
OBEX is a communication protocol that is used to transfer binary objects over for example IR or Bluetooth. This article shows how to create a UIQ3 application that transfers files to remote devices using OBEX over Bluetooth. The Bluetooth profile used on-top of OBEX is OPP (Object Push Profile) which is supported by many devices (phones, computers, etc.). The example application pushes files from the UIQ3 phone it is running on to remote devices, and is not dependent on any server application running on the remote device other than the standard OPP service already existing on devices supporting OPP.
The example application is used by selecting a number of recipients and a number of local folders, and then pressing Start. All files in the selected folders are then transferred to the list of recipients. When the recipients and folders lists have been set up, they can be used to perform the same transfer any number of times. The transfer can be aborted by pressing Stop.
The "Recipients" tab shows the list of recipients. The screenshot below is taken when the transfer is in progress. The transfer to the W960i and the P1i is completed and the transfer to the W910i is currently active. When all files are transferred to the W910i, they will also be transferred to the K850i and the T650i.
The "Folder" tab shows a list of all folders that should be transferred to the recipients. All files in the folders are transferred, but the content in their subfolders are not.
OBEX is a communication protocol that is used to transfer binary objects over for example IR or Bluetooth. This article shows how to create a UIQ3 application that transfers files to remote devices using OBEX over Bluetooth. The Bluetooth profile used on-top of OBEX is OPP (Object Push Profile) which is supported by many devices (phones, computers, etc.). The example application pushes files from the UIQ3 phone it is running on to remote devices, and is not dependent on any server application running on the remote device other than the standard OPP service already existing on devices supporting OPP.
The example application is used by selecting a number of recipients and a number of local folders, and then pressing Start. All files in the selected folders are then transferred to the list of recipients. When the recipients and folders lists have been set up, they can be used to perform the same transfer any number of times. The transfer can be aborted by pressing Stop.
The "Recipients" tab shows the list of recipients. The screenshot below is taken when the transfer is in progress. The transfer to the W960i and the P1i is completed and the transfer to the W910i is currently active. When all files are transferred to the W910i, they will also be transferred to the K850i and the T650i.
The "Folder" tab shows a list of all folders that should be transferred to the recipients. All files in the folders are transferred, but the content in their subfolders are not.
The main class demonstrated in this example is CObexClient. This class includes the client side functionality of an OBEX connection. First the CObexClient is created using CObexClient::NewL() taking a TObexProtocolInfo reference. TObexProtocolInfo holds the protocol information of the transport that the OBEX connection should use. Different classes derived from TObexProtocolInfo holds the information for different underlying transport protocols. In this case, the example application uses the TObexBluetoothProtocolInfo subclass (derived from TObexProtocolInfo) which holds the Bluetooth specific protocol information. TObexBluetoothProtocolInfo has a TRfcommSockAddr member which for CObexClient defines the device address and server channel to connect to.
After the CObexClient is created, it is connected to the server using CObexClient::Connect(). The example application uses an active object to handle the asynchronous operations, such as connect. When the CObexClient is connected to the server on the remote device, the files are transferred using the CObexClient::put() method. It takes a CObexBaseObject which represents the object that should be transferred. The CObexBaseObject base class is abstract so a derived class must be used. There are several different derived classes which store the object body in different way. This example application uses a CObexFileObject which has its body stored as a file on disk. The CObexFileObject is simply created using CObexClient::NewL() taking the filename of the file that should be transferred. The object name and length attributes are then set using the CObexFileObject::SetNameL() and CObexFileObject::SetLengthL() methods. This provides the receiving side with some information about the object that should be received.
The example application also uses the CSdpAgent and CSdpSearchPattern classes to contact the remote device's SDP database to find out on which RFCOMM port on the remote device the client should connect to reach the remote device's Object Push Profile service. To find an Object Push Profile service record in the SDP database the KObexUUID constant is used which identifies the Object Push Profile.
Other relevant keywords:
- CActive
- CBTDeviceArray
- CDesCArray
- CDir
- CQBTUISelectDialog
- CQikCommandManager
- CQikContent
- CQikListBox
- CQikMultiPageViewBase
- CQikSelectFolderDlg
- CSdpAttrValue
- KObexRfcommProtocol
- KQBTUISelectDlgFlagShowBondedDevices
- MDesCArray
- MSdpAgentNotifier
- MSdpAttributeValueVisitor
- RArray
- TBTSockAddr
To build the example application for UIQ 3-based phones, use the following commands:
bldmake bldfiles
abld build gcce urel
makesis MyBtObexObjectPush.pkg