epoc32/include/mmsvattachmentmanagersync.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/mmsvattachmentmanagersync.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mmsvattachmentmanagersync.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,94 @@
     1.4 -mmsvattachmentmanagersync.h
     1.5 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// 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
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +//
    1.19 +
    1.20 +#ifndef __MMSVATTACHMENTMANAGERSYNC_H__
    1.21 +#define __MMSVATTACHMENTMANAGERSYNC_H__
    1.22 +
    1.23 +#include <e32base.h>
    1.24 +#include <msvstd.h>
    1.25 +#include <cmsvattachment.h>
    1.26 +
    1.27 +class MMsvAttachmentManagerSync
    1.28 +/**
    1.29 +Defines the attachment management extensions interface.
    1.30 +
    1.31 +This class is a pure virtual interface class that defines the APIs to be used for
    1.32 +by MTMs and implementors of MMsvAttachmentManager.
    1.33 +
    1.34 +This API extends the MMsvAttachmentManager with synchronous calls for deleting
    1.35 +and creating attachments. 
    1.36 +
    1.37 +@see CMsvAttachment
    1.38 +@publishedAll
    1.39 +@released
    1.40 +*/
    1.41 +	{
    1.42 +public:	
    1.43 +	/**
    1.44 +	Creates a new empty attachment file.
    1.45 +	
    1.46 +	The caller is returned an open writable file handle to an empty attachment file in the message
    1.47 +	store. The caller must pass in an uninitialised file handle. If the request is sucessful the file handle
    1.48 +	is open and must close by the caller once the data has been written to it.
    1.49 +	
    1.50 +	@param aFileName The filename to assign to the newly create attachment file.
    1.51 +	@param aAttachmentFile An uninitialised file handle. This is opened and can be written to if the
    1.52 +		   request is successful. The ownership is transferred . The caller must close the file handle.
    1.53 +	@param aAttachmentInfo The attachment info associated with the file.
    1.54 +	  If the routine does not leave, then ownership will be transferred to the
    1.55 +	  attachment manager. If the routine does leave then ownership will not have
    1.56 +	  been transfered and the caller is responsible for cleanup.
    1.57 +	@leave KErrAccessDenied If attachment manager is in read-only mode.
    1.58 +	*/
    1.59 +	virtual void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, CMsvAttachment* aAttachmentInfo) = 0;
    1.60 +
    1.61 +
    1.62 +
    1.63 +	/**
    1.64 +	Renames the physical filename of an attachment.
    1.65 +	
    1.66 +	@param aIndex The array index position of the attachment to be renamed.
    1.67 +	@param aNewName The new name of the attachment.
    1.68 +	@leave KErrAccessDenied If attachment manager is in read-only mode.
    1.69 +	@leave KErrAlreadyExists If the supplied attachment filename already exists.
    1.70 +	*/
    1.71 +	virtual void RenameAttachmentL(TInt aIndex, const TDesC& aNewName) = 0;
    1.72 +
    1.73 +	
    1.74 +	/**
    1.75 +	Removes the attachment from the message entry.
    1.76 +	
    1.77 +	This changes the array index values of all the attachments after the removed one.
    1.78 +	Attachment files stored in the message store are deleted. Linked files and message entry 
    1.79 +	attachments are not deleted, this is left to the caller to do if required.
    1.80 +	
    1.81 +	@param aParam The array index position of the attachment to be removed.
    1.82 +	@leave KErrAccessDenied If attachment manager is in read-only mode.
    1.83 +	*/
    1.84 +	virtual void RemoveAttachmentL(TInt aIndex) = 0;
    1.85 +	
    1.86 +	/**
    1.87 +	Modify existing attachment
    1.88 +	@param aAttachmentInfo The attachment info associated with the file.
    1.89 +	  If the routine does not leave, then ownership will be transferred to the
    1.90 +	  attachment manager. If the routine does leave then ownership will not have
    1.91 +	  been transfered and the caller is responsible for cleanup.
    1.92 +	@leave KErrAccessDenied If attachment manager is in read-only mode.
    1.93 +	*/
    1.94 +	virtual void ModifyAttachmentInfoL(CMsvAttachment* aAttachmentInfo) = 0;
    1.95 +	
    1.96 +	};
    1.97 +
    1.98 +#endif // __MMSVATTACHMENTMANAGERSYNC_H__