×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    68

    Accessing to data (Call history, Event List, Todo List...)

    Hi,

    Is there an solution to retrieve the call history, the event List en the todo List.

    I can retrieve SMS, Email and Contacts.

    Thanks for your help.

  2. #2
    Super Contributor
    Join Date
    Jun 2006
    Location
    Moscow, Russia
    Posts
    803

    Re: Accessing to data (Call history, Event List, Todo List...)

    Check here about the call history and here about Todos and events.
    Regards,
    ivey

  3. #3
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    68

    Re: Accessing to data (Call history, Event List, Todo List...)

    Quote Originally Posted by ivey View Post
    Check here about the call history and here about Todos and events.
    Thanks.

    I have just found for the Call Log.

  4. #4
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    68

    Re: Accessing to data (Call history, Event List, Todo List...)

    Hi,

    I have implemented the class but, the app doesn't go into the runL() and i don't know why.



    My .h :

    Code:
    #ifndef DATACALLLOG_H
    #define DATACALLLOG_H
    
    #include <e32base.h>
    #include <logcli.h>   // CLogClient
    #include <logview.h>  // CLogViewRecent
     
    enum TTask
        {
        EGetRecent,
        ESleep
        };
     
    class CDataCallLog : public CActive
        {
    public:
    
    	CDataCallLog ();
        static CDataCallLog * NewL();
        static CDataCallLog * NewLC();
        ~CDataCallLog();
     
        /**
         * Reads recent events from the main event database
         */
        void ReadRecentEventsL();
     
    private:
        void ConstructL();
        void RunL();
        TInt RunError(TInt anError);
        void DoCancel();
     
        /**
         * Handles a single recent event.
         */
        void HandleRecentEventL(const CLogEvent& anEvent);
        
    private: // Data
        RFs iFs;
        CLogClient* iLogClient;
        CLogViewRecent* iLogViewRecent;
        RPointerArray<CLogEvent> iData;
        TTask iTask;    // Task for RunL
        TInt j;
        TInt i;
        };
    
    #endif // DATACALLLOG_H
    My .cpp :

    Code:
    #include <e32base.h>
    #include <logcli.h>   // CLogClient
    #include <logview.h>  // CLogViewRecent
    #include <logwrap.h>  // CLogEvent
     
    #include "DataCallLog.h"
     
    /**
     * Constructor. Defines the priority for this active object.
     */
    CDataCallLog::CDataCallLog() : CActive(EPriorityStandard)
        {
        }
     
    /**
     * 2nd phase constructor.
     */
    CDataCallLog* CDataCallLog::NewL()
        {
        CDataCallLog* self = CDataCallLog::NewLC();
        CleanupStack::Pop(self);
        return self;
        }
     
    /**
     * 2nd phase constructor.
     */
    CDataCallLog* CDataCallLog::NewLC()
        {
        CDataCallLog* self = new (ELeave) CDataCallLog();
        CleanupStack::PushL(self);
        self->ConstructL();
        return self;
        }
     
    /**
     * 2nd phase constructor.
     */
    void CDataCallLog::ConstructL()
        {
        User::LeaveIfError(iFs.Connect());
     
        // Establish connection to log engine
        iLogClient = CLogClient::NewL(iFs);
        iLogViewRecent = CLogViewRecent::NewL(*iLogClient);
     
        iTask = ESleep; // Default task for RunL
     
        CActiveScheduler::Add(this);
    
        }
     
    /**
     * Destructor.
     */
    CDataCallLog::~CDataCallLog()
        {
        Cancel();
     
        delete iLogViewRecent;
        delete iLogClient;
     
        iFs.Close();
        }
     
    /**
     * From CActive.
     */
    void CDataCallLog::RunL()
        {
        j = 4;
        switch (iTask)
            {
            case EGetRecent:
                {
                // Retrieve the event and handle it
                HandleRecentEventL(iLogViewRecent->Event());
                
                // If there are more events in the log engine database...
                if (iLogViewRecent->NextL(iStatus))
                    {
                    if (iStatus == KErrNone)
                        {
                        // ... set active to get the next one
                        SetActive();
                        }
                    }
                else
                    {
                    // No more events. Go to sleep.
                    iTask = ESleep;
                    }
                break;
                }
                
            case ESleep:
            default:
                {
                break;
                }
            }
        }
     
    /**
     * From CActive.
     */
    TInt CDataCallLog::RunError(TInt anError)
        {
        return anError;
        }
     
    /**
     * From CActive.
     */
    void CDataCallLog::DoCancel()
        {
        // Cancel the appropriate task
        switch (iTask)
            {
            case EGetRecent:
                {
                iLogViewRecent->Cancel();
                }
                
            case ESleep:
            default:
                {
                break;
                }
            }
        }
     
    /**
     * Reads recent events from the main event database
     */
    void CDataCallLog::ReadRecentEventsL()
        {
        i = 1;
        if (iLogViewRecent->SetRecentListL(KLogNullRecentList, iStatus))
            {
            i = 2;
            if (iStatus == KErrNone)
                {
                i = 3;
                iTask = EGetRecent;
                SetActive();
                }
            }
        }
     
    /**
     * Displays a recent event in an information note.
     */
    void CDataCallLog::HandleRecentEventL(const CLogEvent& anEvent)
        {
        j = 1;
        iData.AppendL(&anEvent);
        }
    My call :
    Code:
    CDataCallLog *iDataCallLog = CDataCallLog::NewLC();
    iDataCallLog->ReadRecentEventsL();

Similar Threads

  1. Replies: 9
    Last Post: 2010-06-10, 12:39
  2. Direct UMTS data call between UMTS devices
    By alexfr2 in forum OMA DM/DS/CP
    Replies: 0
    Last Post: 2007-12-23, 16:42
  3. how to simulate incoming call event in Emulator?? egent !!
    By wjcrr in forum Series 40 & S60 Platform Feedback Archive
    Replies: 0
    Last Post: 2007-05-11, 03:58
  4. GPRS connection problems on 6600..
    By suckho in forum Symbian Networking & Messaging (Closed)
    Replies: 10
    Last Post: 2005-12-02, 14:00
  5. 6680 and bluetooth service profiles
    By ceruault in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-10-08, 22:24

Posting Permissions

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