author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:27:01 +0100 | |
branch | Symbian2 |
changeset 3 | e1b950c65cb4 |
parent 2 | epoc32/include/mmsvattachmentmanagersync.h@2fe1408b6811 |
child 4 | 837f303aceeb |
permissions | -rw-r--r-- |
williamr@2 | 1 |
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 2 |
// All rights reserved. |
williamr@2 | 3 |
// This component and the accompanying materials are made available |
williamr@2 | 4 |
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
williamr@2 | 5 |
// which accompanies this distribution, and is available |
williamr@2 | 6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
williamr@2 | 7 |
// |
williamr@2 | 8 |
// Initial Contributors: |
williamr@2 | 9 |
// Nokia Corporation - initial contribution. |
williamr@2 | 10 |
// |
williamr@2 | 11 |
// Contributors: |
williamr@2 | 12 |
// |
williamr@2 | 13 |
// Description: |
williamr@2 | 14 |
// |
williamr@2 | 15 |
|
williamr@2 | 16 |
#ifndef __MMSVATTACHMENTMANAGERSYNC_H__ |
williamr@2 | 17 |
#define __MMSVATTACHMENTMANAGERSYNC_H__ |
williamr@2 | 18 |
|
williamr@2 | 19 |
#include <e32base.h> |
williamr@2 | 20 |
#include <msvstd.h> |
williamr@2 | 21 |
#include <cmsvattachment.h> |
williamr@2 | 22 |
|
williamr@2 | 23 |
class MMsvAttachmentManagerSync |
williamr@2 | 24 |
/** |
williamr@2 | 25 |
Defines the attachment management extensions interface. |
williamr@2 | 26 |
|
williamr@2 | 27 |
This class is a pure virtual interface class that defines the APIs to be used for |
williamr@2 | 28 |
by MTMs and implementors of MMsvAttachmentManager. |
williamr@2 | 29 |
|
williamr@2 | 30 |
This API extends the MMsvAttachmentManager with synchronous calls for deleting |
williamr@2 | 31 |
and creating attachments. |
williamr@2 | 32 |
|
williamr@2 | 33 |
@see CMsvAttachment |
williamr@2 | 34 |
@publishedAll |
williamr@2 | 35 |
@released |
williamr@2 | 36 |
*/ |
williamr@2 | 37 |
{ |
williamr@2 | 38 |
public: |
williamr@2 | 39 |
/** |
williamr@2 | 40 |
Creates a new empty attachment file. |
williamr@2 | 41 |
|
williamr@2 | 42 |
The caller is returned an open writable file handle to an empty attachment file in the message |
williamr@2 | 43 |
store. The caller must pass in an uninitialised file handle. If the request is sucessful the file handle |
williamr@2 | 44 |
is open and must close by the caller once the data has been written to it. |
williamr@2 | 45 |
|
williamr@2 | 46 |
@param aFileName The filename to assign to the newly create attachment file. |
williamr@2 | 47 |
@param aAttachmentFile An uninitialised file handle. This is opened and can be written to if the |
williamr@2 | 48 |
request is successful. The ownership is transferred . The caller must close the file handle. |
williamr@2 | 49 |
@param aAttachmentInfo The attachment info associated with the file. |
williamr@2 | 50 |
If the routine does not leave, then ownership will be transferred to the |
williamr@2 | 51 |
attachment manager. If the routine does leave then ownership will not have |
williamr@2 | 52 |
been transfered and the caller is responsible for cleanup. |
williamr@2 | 53 |
@leave KErrAccessDenied If attachment manager is in read-only mode. |
williamr@2 | 54 |
*/ |
williamr@2 | 55 |
virtual void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, CMsvAttachment* aAttachmentInfo) = 0; |
williamr@2 | 56 |
|
williamr@2 | 57 |
|
williamr@2 | 58 |
|
williamr@2 | 59 |
/** |
williamr@2 | 60 |
Renames the physical filename of an attachment. |
williamr@2 | 61 |
|
williamr@2 | 62 |
@param aIndex The array index position of the attachment to be renamed. |
williamr@2 | 63 |
@param aNewName The new name of the attachment. |
williamr@2 | 64 |
@leave KErrAccessDenied If attachment manager is in read-only mode. |
williamr@2 | 65 |
@leave KErrAlreadyExists If the supplied attachment filename already exists. |
williamr@2 | 66 |
*/ |
williamr@2 | 67 |
virtual void RenameAttachmentL(TInt aIndex, const TDesC& aNewName) = 0; |
williamr@2 | 68 |
|
williamr@2 | 69 |
|
williamr@2 | 70 |
/** |
williamr@2 | 71 |
Removes the attachment from the message entry. |
williamr@2 | 72 |
|
williamr@2 | 73 |
This changes the array index values of all the attachments after the removed one. |
williamr@2 | 74 |
Attachment files stored in the message store are deleted. Linked files and message entry |
williamr@2 | 75 |
attachments are not deleted, this is left to the caller to do if required. |
williamr@2 | 76 |
|
williamr@2 | 77 |
@param aParam The array index position of the attachment to be removed. |
williamr@2 | 78 |
@leave KErrAccessDenied If attachment manager is in read-only mode. |
williamr@2 | 79 |
*/ |
williamr@2 | 80 |
virtual void RemoveAttachmentL(TInt aIndex) = 0; |
williamr@2 | 81 |
|
williamr@2 | 82 |
/** |
williamr@2 | 83 |
Modify existing attachment |
williamr@2 | 84 |
@param aAttachmentInfo The attachment info associated with the file. |
williamr@2 | 85 |
If the routine does not leave, then ownership will be transferred to the |
williamr@2 | 86 |
attachment manager. If the routine does leave then ownership will not have |
williamr@2 | 87 |
been transfered and the caller is responsible for cleanup. |
williamr@2 | 88 |
@leave KErrAccessDenied If attachment manager is in read-only mode. |
williamr@2 | 89 |
*/ |
williamr@2 | 90 |
virtual void ModifyAttachmentInfoL(CMsvAttachment* aAttachmentInfo) = 0; |
williamr@2 | 91 |
|
williamr@2 | 92 |
}; |
williamr@2 | 93 |
|
williamr@2 | 94 |
#endif // __MMSVATTACHMENTMANAGERSYNC_H__ |