localconnectivityservice/obexserviceman/utils/inc/obexutilsentryhandler.h
changeset 0 c3e98f10fcf4
child 38 3dcb815346df
equal deleted inserted replaced
-1:000000000000 0:c3e98f10fcf4
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Definition of the global progress dialog class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef OBEXUTILSENTRYHANDLER_H_
       
    21 #define OBEXUTILSENTRYHANDLER_H_
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <cmsvattachment.h>
       
    25 
       
    26 /**
       
    27  *  Obexutils link hander
       
    28  *  Maintain the links in inbox.
       
    29  * 
       
    30  *  @since S60 v5.0
       
    31  */
       
    32 
       
    33 NONSHARABLE_CLASS( CObexutilsEntryhandler ) : public CActive
       
    34 {
       
    35 
       
    36 public:
       
    37 
       
    38     static CObexutilsEntryhandler* NewL();
       
    39     static CObexutilsEntryhandler* NewLC();    
       
    40 
       
    41     /**
       
    42      * Destructor.
       
    43      */
       
    44     virtual ~CObexutilsEntryhandler();
       
    45 
       
    46     /**
       
    47      * Add an linked attachment to entry 
       
    48      *
       
    49      * @since S60 v5.0
       
    50      * @param aFilePath The absolute file path of the linked attachment file. 
       
    51      * @param anAttachInfo The attachment info associated with the file.
       
    52      * @param aStore An interface over the message store that is associated with a message entry.
       
    53      * @return error code
       
    54      */
       
    55     TInt AddEntryAttachment(const TDesC &aFilePath, CMsvAttachment* anAttachInfo, CMsvStore* aStore );
       
    56     
       
    57     /**
       
    58      * Update an entry attachment
       
    59      * @since S60 v5.0
       
    60      * @param aFilePath the absolute file path of the linked attachment file.
       
    61      * @param anAttachInfo the attachment info associated with the file.
       
    62      * @param aStore An interface ove the message store that is associated with a message entry.
       
    63      * @return error code
       
    64      */
       
    65     TInt UpdateEntryAttachment(TFileName& aFileName,
       
    66                               CMsvAttachment* anOldAttachInfo,
       
    67                               CMsvAttachment* aNewAttachInfo,
       
    68                               CMsvStore* aStore );
       
    69     
       
    70     // from base class CActive
       
    71          
       
    72     /**
       
    73      * From CActive.
       
    74      * RunL
       
    75      *
       
    76      * @since S60 v5.0
       
    77      */
       
    78     void RunL();
       
    79          
       
    80     /**
       
    81      * From CActive.
       
    82      * DoCancel
       
    83      *
       
    84      * @since S60 v5.0
       
    85      */
       
    86     void DoCancel();
       
    87     
       
    88     
       
    89 private:
       
    90     /**
       
    91      * Default C++ constructor.
       
    92      */ 
       
    93     CObexutilsEntryhandler();
       
    94     
       
    95     /**
       
    96      * Symbian two-phase constructor.
       
    97      */ 
       
    98     void ConstructL();
       
    99 
       
   100     /**
       
   101      * Add link attachment 
       
   102      * 
       
   103      * @since S60 v5.0
       
   104      */
       
   105     void DoAddEntryAttachmentL(const TDesC &aFilePath, CMsvAttachment* anAttachInfo, CMsvStore* aStore);
       
   106     
       
   107    
       
   108     /**
       
   109      * Update link attachment 
       
   110      * 
       
   111      * @since S60 v5.0
       
   112      */
       
   113     void DoUpdateEntryAttachmentL(TFileName& aFileName,
       
   114                                  CMsvAttachment* anOldAttachInfo,
       
   115                                  CMsvAttachment* aNewAttachInfo,
       
   116                                  CMsvStore* aStore);
       
   117     
       
   118 private: // member data
       
   119 
       
   120      
       
   121     /**
       
   122      * Sync waiter object 
       
   123      */
       
   124     CActiveSchedulerWait    iSyncWaiter;
       
   125 
       
   126 
       
   127 };
       
   128 
       
   129 
       
   130 #endif /*OBEXUTILSENTRYHANDLER_H_*/