javaextensions/pim/agnadapter/inc.s60/cpimeventlistadapter.h
changeset 76 4ad59aaee882
parent 26 dc7c549001d5
child 83 26b2b12093af
equal deleted inserted replaced
69:773449708c84 76:4ad59aaee882
    25 #include "pimexternalchanges.h"
    25 #include "pimexternalchanges.h"
    26 
    26 
    27 // FORWARD DECLARATIONS
    27 // FORWARD DECLARATIONS
    28 class MPIMEventItem;
    28 class MPIMEventItem;
    29 class CPIMAgnEventAdapter;
    29 class CPIMAgnEventAdapter;
       
    30 class CCalSession;
    30 
    31 
    31 // CLASS DECLARATION
    32 // CLASS DECLARATION
    32 
    33 
    33 /**
    34 /**
    34  * PIM Event List Adapter class
    35  * PIM Event List Adapter class
    45      * Two-phased constructor.
    46      * Two-phased constructor.
    46      */
    47      */
    47     static CPIMEventListAdapter* NewL(
    48     static CPIMEventListAdapter* NewL(
    48         CCalEntry::TType aEntryType,
    49         CCalEntry::TType aEntryType,
    49         CPIMAgnEventAdapter* aEventAdapter,
    50         CPIMAgnEventAdapter* aEventAdapter,
    50         java::util::FunctionServer* aFuncServer);
    51         java::util::FunctionServer* aFuncServer,
       
    52         CCalSession *aCalSession);
    51 
    53 
    52     /**
    54     /**
    53      * Destructor.
    55      * Destructor.
    54      */
    56      */
    55     virtual ~CPIMEventListAdapter();
    57     virtual ~CPIMEventListAdapter();
   135      * The method leaves on error. Such error always means that the list
   137      * The method leaves on error. Such error always means that the list
   136      * adapter is non-functional.
   138      * adapter is non-functional.
   137      */
   139      */
   138     void CreateEventItemL(MPIMEventItem& aEventItem);
   140     void CreateEventItemL(MPIMEventItem& aEventItem);
   139 
   141 
   140     void DoCreateEventItemL(MPIMEventItem& aEventItem);
   142     void CPIMEventListAdapter::DoCreateEventItemL(
       
   143         MPIMEventItem& aEventItem);
   141 
   144 
   142     /**
   145     /**
   143      * Reads an existing event item from the Agenda File.
   146      * Reads an existing event item from the Agenda File.
   144      * The adapter maps the Item ID in \a aEventItem to a native Agenda Model
   147      * The adapter maps the Item ID in \a aEventItem to a native Agenda Model
   145      * entry identifier, reads the entry and sets the data of
   148      * entry identifier, reads the entry and sets the data of
   160      *        native Agenda File.
   163      *        native Agenda File.
   161      * @li Other - The list adapter is non-functional.
   164      * @li Other - The list adapter is non-functional.
   162      */
   165      */
   163     void ReadEventItemL(MPIMEventItem& aEventItem);
   166     void ReadEventItemL(MPIMEventItem& aEventItem);
   164 
   167 
   165     void DoReadEventItemL(MPIMEventItem& aEventItem);
   168     void CPIMEventListAdapter::DoReadEventItemL(
       
   169         MPIMEventItem& aEventItem);
   166 
   170 
   167     /**
   171     /**
   168      * Writes an existing event item to the native Agenda File.
   172      * Writes an existing event item to the native Agenda File.
   169      * The adapter maps the Item ID in \a aEventItem to a native Agenda Model
   173      * The adapter maps the Item ID in \a aEventItem to a native Agenda Model
   170      * entry identifier, reads the entry and sets the data of the entry
   174      * entry identifier, reads the entry and sets the data of the entry
   186      *        client. The operation may succeed later.
   190      *        client. The operation may succeed later.
   187      * @li Other - The list adapter is non-functional.
   191      * @li Other - The list adapter is non-functional.
   188      */
   192      */
   189     void WriteEventItemL(MPIMEventItem& aEventItem);
   193     void WriteEventItemL(MPIMEventItem& aEventItem);
   190 
   194 
   191     void DoWriteEventItemL(MPIMEventItem& aEventItem);
   195     void CPIMEventListAdapter::DoWriteEventItemL(
       
   196         MPIMEventItem& aEventItem);
   192 
   197 
   193     /**
   198     /**
   194      * Removes an existing event from the native Agenda File.
   199      * Removes an existing event from the native Agenda File.
   195      * The adapter maps \a aItemID to a native Agenda Model entry and removes
   200      * The adapter maps \a aItemID to a native Agenda Model entry and removes
   196      * it.
   201      * it.
   206      *        client. The operation may succeed later.
   211      *        client. The operation may succeed later.
   207      * @li Other - The list adapter is non-functional.
   212      * @li Other - The list adapter is non-functional.
   208      */
   213      */
   209     void RemoveEventItemL(TPIMItemID aItemID);
   214     void RemoveEventItemL(TPIMItemID aItemID);
   210 
   215 
   211     void DoRemoveEventItemL(TPIMItemID aItemID);
   216     void CPIMEventListAdapter::DoRemoveEventItemL(
       
   217         TPIMItemID aItemID);
   212 
   218 
   213 protected:
   219 protected:
   214 
   220 
   215     /**
   221     /**
   216      * C++ default constructor.
   222      * C++ default constructor.
   220     /**
   226     /**
   221      * By default Symbian 2nd phase constructor is private.
   227      * By default Symbian 2nd phase constructor is private.
   222      */
   228      */
   223     void ConstructL(
   229     void ConstructL(
   224         CCalEntry::TType aEntryType,
   230         CCalEntry::TType aEntryType,
   225         CPIMAgnEventAdapter* aEventAdapter);
   231 
       
   232         CPIMAgnEventAdapter* aEventAdapter,
       
   233         TInt aCalSessionInt);
   226 
   234 
   227 private: // Member data
   235 private: // Member data
   228 
   236 
   229     CPIMAgnEventAdapter* iAgnAdapter;
   237     CPIMAgnEventAdapter* iAgnAdapter;
   230     CDesCArrayFlat* iEventCategoryArray;
   238     CDesCArrayFlat* iEventCategoryArray;