×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    2

    Post Find the mime type of a file

    Hi,

    I want to know which is the class used to know the mimetype of a file in S60. Like in UIQ it is "CQikMediaFileFolderUtils"

    Similarly how can we find the mimetype of a file in S60. Is there anyway to find other than writing recognizers.

    Please let me know on this if anybody know anything.

    WR,
    S60_dev

  2. #2
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    122

    Re: Find the mime type of a file

    [QUOTE=S60_dev;516273]Hi,

    I want to know which is the class used to know the mimetype of a file in S60. Like in UIQ it is "CQikMediaFileFolderUtils"


    In S60 use the PathInfo API, same as
    In UIQ CQikMediaFileFolderUtils API (GetDefaultFolderPathL)

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

    Re: Find the mime type of a file

    have a look into RApaLsSession, with it you can recognize any file that has recognizer in the system, AFAIK, you do need a recognizer to recognize a file, since things usually do not just happen without somebody actually doing the required tasks.

  4. #4
    Regular Contributor
    Join Date
    Feb 2008
    Location
    Pune, India
    Posts
    340

    Re: Find the mime type of a file

    Hi,

    As you mentioned recognizers, I understand that you are working on the 2nd Edition. A team mate wrote a recognizer to find out the file extension and hence the MIME type but to tell you recognizers don't work in S60 3rd.

    We also tried to use the "file header" to recognize the MIME type but nothing really worked. You can search for similar APIs.
    Regards,
    Sainagakishore Srikantham (Kishore)

    Don't Hope, KNOW!!! ---------- Visit me at http://ssnkishore.blogspot.com ----------

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,684

    Re: Find the mime type of a file

    That is a personal experince of your team mate. Recognizers obviously work, otherwise you could not open anything with the File Manager.
    You can get a working one from SymTorrent, http://symtorrent.aut.bme.hu
    But it is true that recognizers need ProtServ capability and protected UID, so they will not work with self-signing for example.

  6. #6
    Registered User
    Join Date
    Dec 2008
    Posts
    2

    Question Re: Find the mime type of a file

    Hi,

    Thnx for the reply.
    I've written this code snippet. But still unable to get the files count having mimetype.

    TBuf8<32> mimetype(_L8("image"));
    TBuf<128> filePath;
    filePath.Append(_L("c:\\Data\\Images\\"));
    TRequestStatus status;
    CDataRecognitionResultArray result;
    RApaLsSession aApaSession;

    User::LeaveIfError( aApaSession.Connect() );
    CleanupClosePushL( aApaSession );
    aApaSession.RecognizeFilesL(filePath, mimetype, result, status);
    TInt Count = result.Count();
    aApaSession.Close();
    CleanupStack::PopAndDestroy(); // apaSession


    Am I doing something wrong here?

    WR,
    S60_dev

  7. #7
    Super Contributor
    Join Date
    Jul 2008
    Location
    Chennai,India
    Posts
    889

    Re: Find the mime type of a file

    But it is true that recognizers need ProtServ capability and protected UID, so they will not work with self-signing for example.
    Have you taken the wizard's comments into account...

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

    Re: Find the mime type of a file

    you could try this out: http://wiki.forum.nokia.com/index.ph...ing_file_types

    anyway using RApaLsSession for recognizing files, would not require the capability mentioned, only constructing a recognizer dll would require the capability.

  9. #9
    Regular Contributor
    Join Date
    Feb 2008
    Location
    Pune, India
    Posts
    340

    Re: Find the mime type of a file

    Don't you think you should probably include the name of the file as well? Something like "C:\\Data\\images\\image.jpg"
    Regards,
    Sainagakishore Srikantham (Kishore)

    Don't Hope, KNOW!!! ---------- Visit me at http://ssnkishore.blogspot.com ----------

Similar Threads

  1. problem when importing from carbide c++ to vs 2003!
    By misfit.physics in forum Symbian Tools & SDKs
    Replies: 12
    Last Post: 2008-02-19, 09:45
  2. Error with makesis.exe and creating the .pkg file
    By gramya87 in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2007-10-10, 13:53
  3. Combined Delivery mime type confusion on 6233 & 3250
    By cbang in forum Digital Rights Management & Content Downloading
    Replies: 2
    Last Post: 2007-02-23, 18:07
  4. Tips on using NDS 1.1
    By mitts in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2006-01-18, 16:07

Posting Permissions

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