messagingfw/sendas/test/unit/src/SENDAS2MTM3.CPP
changeset 62 db3f5fa34ec7
parent 0 8e480a14352b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/messagingfw/sendas/test/unit/src/SENDAS2MTM3.CPP	Wed Nov 03 22:41:46 2010 +0530
@@ -0,0 +1,71 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include "SENDAS2MTM.H"
+#include <mtmdef.h>
+
+
+TInt CSendMtm::QueryCapability(TUid aCapability, TInt& aResponse)
+	{
+	TInt ret=KErrNone;
+	switch (aCapability.iUid)
+		{
+		// supported
+		case KUidMtmQuerySendAsMessageSendSupportValue:
+		case KUidMtmQueryCanSendMsgValue:
+		case KUidMtmQueryOffLineAllowedValue:
+			break;
+		// supported with responses
+		case KUidMtmQueryMaxBodySizeValue:
+			aResponse = 0x10000;
+			break;
+		case KUidMtmQuerySupportedBodyValue:
+			aResponse = KMtm7BitBody|KMtm8BitBody;
+			break;
+		case KUidMtmQueryMaxTotalMsgSizeValue:
+			aResponse = 0x40000;
+			break;
+		// not supported
+		case KUidMtmQuerySupportsRecipientTypeValue:
+		case KUidMtmQueryCanReceiveMsgValue:
+		case KUidMtmQuerySupportAttachmentsValue:
+		default:
+			ret=KErrNotSupported;
+			break;
+		}
+	return ret;
+	}
+
+TUint CSendMtm::ValidateMessage(TMsvPartList /*aPartList*/)
+	{
+	return KMsvMessagePartBody;
+	}
+
+
+void CSendMtm::SetSubjectL(const TDesC& /*aSubject*/)
+	{
+	User::Leave(KErrCancel);
+	}
+
+void CSendMtm::AddAddresseeL(TMsvRecipientType /*aType*/, const TDesC& /*aRealAddress*/)
+	{
+	User::Leave(KErrNotSupported);	
+	}
+	
+void CSendMtm::AddAddresseeL(TMsvRecipientType /*aType*/, const TDesC& /*aRealAddress*/, const TDesC& /*aAlias*/)
+	{
+	User::Leave(KErrNotSupported);	
+	}
+