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