×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    18

    Data caging issue -Urgent Help

    Hi, Let me explain the situation. I hv developed an application which is capable of sending some files via Blue-tooth. Every time it sends, the file file reaches messaging In-box.

    Here comes the problem:
    When the user tries to open the file from from in-box it invokes the application(mentioned above).The application has to read the file sitting in in-box according to requirements. While trying so the application fails to read the mentioned file,as it sits in some other private\SID(probably messaging application's) folder other than the application's.

    following is the code Application handler:

    void CAWGS60Document::OpenFileL(CFileStore*& aFileStore, RFile& aFile)
    {
    TFileName iFileName;
    aFile.FullName(iFileName);
    _LIT(KDestFile,"C:\\Private\\EA681F76\\BTFile.xml"); //no extension required
    CDocumentHandler* iDocHandler= CDocumentHandler::NewL();
    TDataType nullType; //MIME type not set
    TInt ret = KErrNone;
    TRAPD(err, ret = iDocHandler->CopyL(iFileName,KDestFile,nullType, KEntryAttNormal) );
    if( err || ret)
    {
    //handle error
    CEikonEnv::Static()->InfoWinL(_L("FileCopyError"),iFileName);
    }
    //Get the destination path
    TFileName path;
    iDocHandler->GetPath(path);
    }

    Please suggest how to come over the situation other that using allfile capability.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: Data caging issue -Urgent Help

    Try handling the file with the RFile handle.

  3. #3
    Registered User
    Join Date
    Feb 2008
    Posts
    18

    Re: Data caging issue -Urgent Help

    I tryied with the following code but din't help!
    Out put:File can't be opened.

    void CAWGS60Document::OpenFileL(CFileStore*& aFileStore, RFile& aFile)
    {
    TFileName iFileName;
    aFile.FullName(iFileName);
    _LIT(KDestFile,"C:\\Private\\EA681F76\\BTFile.xml"); //no extension required
    RFs aRf;
    aRf.Connect();
    TInt aERROR=aFile.Open(aRf, iFileName, EFileRead);
    if(KErrNone == aERROR)
    CEikonEnv::Static()->InfoWinL(_L("No error"),iFileName);
    else
    CEikonEnv::Static()->InfoWinL(_L("File can't be opened"),iFileName);
    aRf.Close();
    }

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: Data caging issue -Urgent Help

    I have to confess, I do not know how these things work exactly. However that is absolutely sure that you will not succeed with opening a file in someone else's private folder (without having AllFiles capability). And if this OpenFileL gets an already opened and accessible "RFile &aFile" (this is what I am absolutely not sure about, though the lack of any RFs around suggests that), you should simply try aFile.Read, instead of re-opening the handle, which would probably cause an error even without data caging.

  5. #5
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: Data caging issue -Urgent Help

    The messaging application will pass you a temporary file handle via the RFile in the OpenFile parameter which you can read from and display or do what ever with. In this case the file handle will be the handle of the file in the messaging app.

    At no stage can you "open" a file that is not in the data cage, such as in a private folder that is not your process's or in \sys.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  6. #6
    Registered User
    Join Date
    Feb 2008
    Posts
    18

    Re: Data caging issue -Urgent Help

    Yep, It's working fine, I will take down your suggation

Similar Threads

  1. Wierd issue when attempting to transfer data over BT
    By christoffer.haglund in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2007-09-21, 13:19
  2. data cable...urgent
    By zmrcic in forum Feedback - Nokia Developer Services & Infrastructure
    Replies: 0
    Last Post: 2007-09-16, 08:46
  3. suckho, i have encontered the same problems. Could you tell me how you resolved it?
    By dicson_hu in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2005-12-09, 10:56
  4. Urgent help, lenght of recieved data via Bluetooth not as sent one
    By murmur20 in forum Symbian Networking & Messaging (Closed)
    Replies: 10
    Last Post: 2005-09-27, 11:42
  5. Problems with client/server data transfer
    By wilse in forum Symbian
    Replies: 1
    Last Post: 2004-08-03, 16:14

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×