--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mtpfws/mtpfw/datatypes/src/tmtptypeuint64.cpp Tue Feb 02 01:11:40 2010 +0200
@@ -0,0 +1,91 @@
+// Copyright (c) 2006-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:
+//
+
+/**
+ @file
+ @publishedPartner
+*/
+
+#include <mtp/mtpdatatypeconstants.h>
+#include <mtp/tmtptypeuint64.h>
+
+/**
+Default constructor.
+*/
+EXPORT_C TMTPTypeUint64::TMTPTypeUint64() :
+ iData(0)
+ {
+
+ }
+
+/**
+Conversion constructor from native type.
+*/
+EXPORT_C TMTPTypeUint64::TMTPTypeUint64(TUint64 aData) :
+ iData(aData)
+ {
+
+ }
+
+/**
+Sets the data type to the specified value.
+*/
+EXPORT_C void TMTPTypeUint64::Set(TUint64 aValue)
+ {
+ iData = aValue;
+ }
+
+/**
+Provides data types's value.
+@return The value of the data type
+*/
+EXPORT_C TUint64 TMTPTypeUint64::Value() const
+ {
+ return iData;
+ }
+
+EXPORT_C TInt TMTPTypeUint64::FirstReadChunk(TPtrC8& aChunk) const
+ {
+ aChunk.Set(reinterpret_cast<const TUint8*>(&iData), sizeof(iData));
+ return KMTPChunkSequenceCompletion;
+ }
+
+EXPORT_C TInt TMTPTypeUint64::NextReadChunk(TPtrC8& aChunk) const
+ {
+ aChunk.Set(NULL, 0);
+ return KErrNotReady;
+ }
+
+EXPORT_C TInt TMTPTypeUint64::FirstWriteChunk(TPtr8& aChunk)
+ {
+ aChunk.Set(reinterpret_cast<TUint8*>(&iData), 0, sizeof(iData));
+ return KMTPChunkSequenceCompletion;
+ }
+
+EXPORT_C TInt TMTPTypeUint64::NextWriteChunk(TPtr8& aChunk)
+ {
+ aChunk.Set(NULL, 0, 0);
+ return KErrNotReady;
+ }
+
+EXPORT_C TUint64 TMTPTypeUint64::Size() const
+ {
+ return sizeof(iData);
+ }
+
+EXPORT_C TUint TMTPTypeUint64::Type() const
+ {
+ return EMTPTypeUINT64;
+ }