| Reply | « Previous Thread | Next Thread » |
|
Hello All,
My requirement is ... first i have to transfer the file from CObexClient (Master) to CObexServer (Listener)...... Which normal one.... When this transfer is complete and connection is same (establised by the client ) .. now i want to transfer a file from server to client.... Hw can i do this... |
|
i Found something in SDK
COBexServer::GetRequestIndication() : CObexBufObject* GetPacketIndication() : TInt GetCompleteIndication() : TInt and CObexClient::Get(CObexBaseObject &aObject, TRequestStatus &aStatus); but i dont know hw to use them....
Last edited by pawan_G : 2008-12-02 at 07:44.
|
|
Hi,
I'm not sure this is what you are looking for. This is the part of the new OBEX API added in Symbian 9.2. to hav asynchronous behavior of the MObexServerNotify - check new mixin class MObexServerNotifyAsync. Your method is used to complete the call of a Put(Get)RequestIndication(). BR STeN |
|
yes that is the thing i want .... i read SDK and found that Get() API will request to send the file from the Server.... and in response to Get()....
Quote:
Quote:
|
|
i Got it.... that how to use Get() and hw to get the response in server... but getting some prob.. as soon as i will resolve it.. i will give detail of it..
thanx |
|
Hello All,
I got stuch at the last point ... nw m able to Use the Get() API in client side successfully... and i m getting notification at server side also..... my Get() request complete successfully but file is not updating... here is the code For Client side Code:
RFs fs;
RFile file;
fs.Connect();
file.Replace(fs,_L("C:\\Data\\ContDB.DB"),EFileWrite);
file.Close();
fs.Close();
_LIT(aName,"C:\\Data\\ContDB.DB");
TBuf <256> buf(aName);
iObexMasterBufObject=NULL;
CBufFlat *aDataBuf = CBufFlat::NewL(1024);
iObexMasterBufObject = CObexBufObject::NewL(aDataBuf);
iObexMasterBufObject->SetNameL(buf);
iObexClientMaster->Get(*iObexMasterBufObject, iStatus);
SetActive();
Code:
CObexBufObject* CBTCommEngineSlave::GetRequestIndication(
CObexBaseObject *aRequiredObject)
{
RFs fs;
RFile file;
fs.Connect();
file.Open(fs,_L("C:\\Data\\ContDB.DB"),EFileRead);
TInt Size;
file.Size(Size);
iObject = CBufFlat::NewL(Size);
HBufC8* fileBuf = HBufC8::NewLC (Size);
TPtr8 fileBufPtr = fileBuf->Des ();
//HBuf8 ptr = HBuf8::New(Size);
file.Read(fileBufPtr);
TInt i=0;
//iObject->Write(i,fileBufPtr);
iObject->InsertL(0,fileBufPtr);
iObexBufObject = CObexBufObject::NewL(iObject);
CleanupStack::PopAndDestroy();
return iObexBufObject;
}
TInt CBTCommEngineSlave::GetPacketIndication()
{
return KErrNone;
}
TInt CBTCommEngineSlave::GetCompleteIndication()
{
return KErrNone;
}
|
|
Finally i did it......
This was the line which created trouble... when i add this call every thing was fine.... iObexMasterBufObject->SetDataBufL(buf/*Name of the File*/);
Last edited by pawan_G : 2008-12-03 at 05:36.
|
|
hi pawan ,
i want help from u , if u dnt mine can u tell me how u done this , File Transferring form server to client and vice versa. hei but one thing im using Netbeas6.0 IDE for development . plz help me , Thank You, or can u send me sample code on my mail id markwilson1@mail.com Thanx again |
| markwilson |
| View Public Profile |
| Find all posts by markwilson |
|
Hello markwilson,
An example is thr using Obex file transfer on forum... for both C++ and J2ME... u can try that..... |
|
hi pawan ,
thanx for reply , can u give me link of that application my requirement is i want to send a file on another machine /mobile but i m using j2me ,Netbeans6.0 IDE, ya i have also seen ur file transfer example using C++ but dear i want in j2me , so plz specify that application link or can u send me any other source on my mail id markwilson1@mail.com thankx waiting for reply. Mark ![]() |
| markwilson |
| View Public Profile |
| Find all posts by markwilson |
|
Sorry... i did only for C++.. no idea abt J2ME
|
|
Hi Pawan,
I am relatively new to Symbian C++ yet I am have been assigned to look into the Bluetooth application. I request your help. If you dont mind could you please share your code for C++ with me. The code for Receiving files through OBEX in the mobile. Thanks and Regards, Shomik. |
|
Hi Pawan,
I am relatively new to Symbian C++ yet I am have been assigned to look into the Bluetooth application. I request your help. If you dont mind could you please share your code for C++ with me. The code for Receiving files through OBEX in the mobile. My e-mail Id is shc.dsp@gmail.com Thanks and Regards, Shomik. |
|
You can follow the following link to understand the Obex framework... it will help u to Send the file from client to server...
http://discussion.forum.nokia.com/fo...d.php?p=505141 and to receive the file in server try this out Quote:
Thanx and Regards, Pawan Gupta |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Tranfering file by bluetooth | hassan83 | Python | 5 | 2008-04-18 18:01 |
| [announce] PyUIQ. Python for UIQ 2.1 and 3.x | OscarBernabeu | Python | 35 | 2008-01-17 10:12 |
| Big problem in Obex File transfer | lal.rajan | Symbian Networking & Messaging | 1 | 2007-03-31 06:17 |
| client server programming in j2me | mottaisami | Mobile Java Networking & Messaging & Security | 2 | 2006-09-05 15:43 |
| What is the error in my code here? Unable to Save document to file | yuva69 | General Symbian C++ | 1 | 2005-05-26 15:22 |