×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    30

    CALINTERIMAPI: export iCal data

    Hi,

    i try to export ical calendar data.
    this code here runs but maybe I misunderstand the propose of exportL:

    _LIT(KDefaultFileName, "C:\\afile.ics");
    RFs aFs;
    User::LeaveIfError(aFs.Connect());
    CleanupClosePushL(aFs);
    aFs.MkDirAll(KDefaultFileName);
    RFileWriteStream rs;
    User::LeaveIfError(rs.Replace(aFs, KDefaultFileName, EFileWrite));
    CleanupClosePushL(rs);

    CCalSession* calSession = CCalSession::NewL();
    const TDesC& file = calSession->DefaultFileNameL();
    TRAPD(err,calSession->OpenL(file) );

    CCalIter* calIter = CCalIter::NewL(*calSession);
    TBuf8<50> iterUID;
    RPointerArray<CCalEntry> calEntryArray;
    CCalEntryView* calEntryView = CCalEntryView::NewL(*calSession, *this);
    if( !iWait->IsStarted() ) { iWait->Start(); }

    CCalDataExchange* calDataExchange = CCalDataExchange::NewL(*calSession);

    iterUID = calIter->FirstL();
    calEntryView->FetchL(iterUID, calEntryArray);

    while (iterUID != KNullDesC8)
    {
    // get entries associated with this UID
    calEntryView->FetchL(iterUID, calEntryArray);
    iterUID = calIter->NextL();
    };


    TInt errX(0);
    TRAP( errX, calDataExchange->ExportL(KUidVCalendar, rs, calEntryArray) );

    CleanupStack::PopAndDestroy(&rs);
    CleanupStack::PopAndDestroy(&aFs);


    delete calDataExchange;
    delete calEntryView;
    delete calIter;
    delete calSession;
    My questions are:

    1) This construct generates an complete ical structur for each non-repeated calendar entry. BUT:
    All entry blocks start with
    BEGIN:VCALENDAR
    VERSION:1.0
    entry data ...
    and ends with
    END:VCALENDAR
    This is not a vaild ical structur!?!
    Was this made by ExportL or are there errors in my code?

    2) What means parent and child entries?

    3) Why does the app crash at delete calSession; (last line)

    The documentation and the recommended pdf are soooo bad.
    Full of (syntax!) errors, uncomplete pseudo-code. And no examples in the internet.
    I wonder why nokia dont give us a tool to export/import all calendar entries to a portable format. This really annoy me ! awful!


    Plz help

  2. #2
    Nokia Developer Champion
    Join Date
    Jul 2004
    Posts
    2,015

    Re: CALINTERIMAPI: export iCal data

    Its a vCal, iCal isn't supported.
    Last edited by hotcheese; 2006-11-27 at 16:33.

  3. #3
    Registered User
    Join Date
    Oct 2006
    Posts
    30

    Re: CALINTERIMAPI: export iCal data

    I know.
    vCal stores all entries in its own complete vCal structure.
    My out looks like:

    BEGIN:VCALENDAR
    VERSION:1.0
    BEGIN:VEVENT
    UID:U041v7Bz4EBhlA18X2GVU1
    SUMMARY:wewewe
    DTSTART:20061124T000000
    DTEND:20061124T000000
    X-EPOCAGENDAENTRYTYPE:ANNIVERSARY
    CLASS:PRIVATE
    SEQUENCE:0
    X-METHOD:NONE
    RRULE:YM1 11 21001231T000000
    LAST-MODIFIED:20061124T215639Z
    PRIORITY:2
    X-SYMBIAN-LUID:2
    END:VEVENT
    END:VCALENDAR
    BEGIN:VCALENDAR

    VERSION:1.0
    BEGIN:VEVENT
    UID:U041v7Bz4EBhlA18X2GVU1
    SUMMARY:wewewe
    DTSTART:20061124T000000
    DTEND:20061124T000000
    X-EPOCAGENDAENTRYTYPE:ANNIVERSARY
    CLASS:PRIVATE
    SEQUENCE:0
    X-METHOD:NONE
    RRULE:YM1 11 21001231T000000
    LAST-MODIFIED:20061124T215639Z
    PRIORITY:2
    X-SYMBIAN-LUID:2
    END:VEVENT
    END:VCALENDAR
    BEGIN:VCALENDAR

    VERSION:1.0
    BEGIN:VEVENT
    UID:WF86q9Bz4EEZl818X2GVU1
    SUMMARY;ENCODING=QUOTED-PRINTABLE:dfdfdf=09
    DTSTART:20061124T000000
    DTEND:20061124T000000
    X-EPOCAGENDAENTRYTYPE:ANNIVERSARY
    CLASS:PRIVATE
    SEQUENCE:0
    X-METHOD:NONE
    RRULE:YM1 11 21001231T000000
    LAST-MODIFIED:20061124T215648Z
    PRIORITY:2
    X-SYMBIAN-LUID:3
    END:VEVENT
    END:VCALENDAR
    BEGIN:VCALENDAR
    VERSION:1.0
    BEGIN:VEVENT
    UID:Y5CC27Bz4EBwb718X2GVU1
    SUMMARY:yxyxyx
    DTSTART:20061125T080000Z
    DTEND:20061125T080000Z
    X-EPOCAGENDAENTRYTYPE:APPOINTMENT
    CLASS:PRIVATE
    SEQUENCE:0
    X-METHOD:NONE
    LAST-MODIFIED:20061124T215710Z
    PRIORITY:2
    X-SYMBIAN-LUID:4
    END:VEVENT
    END:VCALENDAR
    BEGIN:VCALENDAR
    VERSION:1.0
    BEGIN:VEVENT
    UID:bCIoQ7Bz4EBBW718X2GVU1
    SUMMARY:trtrtrtrt
    DTSTART:20061126T080000Z
    DTEND:20061126T080000Z
    X-EPOCAGENDAENTRYTYPE:APPOINTMENT
    CLASS:PRIVATE
    SEQUENCE:0
    X-METHOD:NONE
    LAST-MODIFIED:20061124T215733Z
    PRIORITY:2
    X-SYMBIAN-LUID:5
    END:VEVENT
    END:VCALENDAR


    What goes wrong here.

    I can process the line in a correct format after exporting.
    But is this output what the export function normaly do?
    Or is there a error in my code?

    best regards

Similar Threads

  1. 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
  2. GPRS connection problems on 6600..
    By suckho in forum Symbian Networking & Messaging (Closed)
    Replies: 10
    Last Post: 2005-12-02, 14:00
  3. Nokia 6600 Socket Server send delay Problem
    By dicson_hu in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-10-31, 07:37
  4. Replies: 2
    Last Post: 2004-09-15, 22:47

Posting Permissions

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