×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    22

    how i can have a log of system call (write)

    Hi, i have to write an application that tell me went the system calls a write() to any file. i would like know if there is some API to get this information, or anyother way.
    thanks.

  2. #2
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: how i can have a log of system call (write)

    Hi,

    Yes it can be done on Symbian but not with Open C (as far as I know anyway). In native Symbian C++ there is the RFs:NotifyChange() method that does pretty much exactly what you are asking.

    Hope that helps,
    Sorcery

  3. #3
    Registered User
    Join Date
    Oct 2008
    Posts
    22

    Re: how i can have a log of system call (write)

    Thanks for your answer.
    Yes, i tried RFs:NotifyChange(), but i can' t find good documentation. Please, if you can, help me to understand how i can use this method.
    I wrote this code but i don't understand result :

    RFs *session = new RFs();
    session->Connect();
    TRequestStatus iStatus = KErrNone;

    while((iStatus.Int() == KErrNone)){
    session->NotifyChange(ENotifyWrite,iStatus,_L("C:\\Nokia\\loglog3.txt"));
    console.Printf(_L("After notify = %d \n"),iStatus.Int());
    }

    note that C:\\Nokia\\loglog3.txt exist.
    Initially iStatus is 0, but after Notifychange() is -2147483647, always.
    But i never changed files. Why?
    Can you help me?
    Thanks

  4. #4
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: how i can have a log of system call (write)

    Hi,

    It's a native Symbian API so you need to learn a little about Symbian concepts.

    The TRequestStatus variable is not something you poll but rather something that you wait on. If the rest of your program is Open C based and you aren't using active objects then you'll probably want to do this in another thread, since it will block until there is a change to the file.

    Normally you'd wrap these asynchronous calls with active objects but if you're using a separate thread then you can use:
    User::WaitForRequest()
    or
    User::WaitForAnyRequest()
    Depending on your requirement, to block and wait for the response.

    Hope that helps,
    Mark

  5. #5
    Registered User
    Join Date
    Oct 2008
    Posts
    22

    Re: how i can have a log of system call (write)

    Can you suggest me any link where i can learn what i need to use active objects?
    Thanks

  6. #6
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: how i can have a log of system call (write)

    Hi,

    There are lots of sites on the web with explanations of active objects and Forum Nokia even have some basic Symbian C++ training material that explains the concepts - just do some searches. To be honest though, if I have to recommend a source I'd say you should read the Accredited Symbian Developer Primer by Jo Stichbury and Mark Jacobs. Or, if you can pick up a cheap 2nd hand copy, Symbian OS Explained (also by Jo but it's a little out of date now - the active object stuff hasn't changed though).

    Unless your whole UI is going to run using active objects and an active scheduler then this might not be the route you want to go down as active objects are used for event driven programming and don't integrate easily with a program that uses a main loop (although of course it can be done you usually end up just blocking the main loop while the active scheduler runs or using another thread anyway).

    Hope that helps,
    Sorcery

Similar Threads

  1. Assess Call log in j2me
    By bfchaudharimca in forum Mobile Java Networking & Messaging & Security
    Replies: 7
    Last Post: 2011-12-18, 20:24
  2. Open call log view
    By martinpeterzon in forum Symbian
    Replies: 5
    Last Post: 2008-08-09, 19:30
  3. Call Log Problem
    By map123 in forum Symbian
    Replies: 7
    Last Post: 2007-03-07, 16:08
  4. Nokia N72 phone call log problem
    By PankajNeve in forum General Development Questions
    Replies: 4
    Last Post: 2007-02-20, 09:19
  5. Call Log PC sync
    By smileyd in forum Symbian
    Replies: 0
    Last Post: 2005-06-29, 21:48

Posting Permissions

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