brandingserver/bsclient/cbsiconfileprovider.cpp
changeset 0 e6b17d312c8b
child 19 7e0cc21eb164
child 42 cfd5c2994f10
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/brandingserver/bsclient/cbsiconfileprovider.cpp	Thu Dec 17 08:54:49 2009 +0200
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2006 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:  Icon file provider.
+ *
+*/
+
+
+// INCLUDE FILES
+#include    "cbsiconfileprovider.h"
+#include	<aknappui.h>
+#include    <AknIconUtils.h>
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CBSIconFileProvider::CBSIconFileProvider
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CBSIconFileProvider::CBSIconFileProvider()
+    {
+    }
+// -----------------------------------------------------------------------------
+// CBSIconFileProvider::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CBSIconFileProvider::ConstructL(RFile& aFile)
+    {
+    User::LeaveIfError( iFile.Duplicate( aFile ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CBSIconFileProvider::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CBSIconFileProvider* CBSIconFileProvider::NewL(
+        RFile& aFile )
+    {
+    CBSIconFileProvider* self = new( ELeave ) CBSIconFileProvider();
+
+    CleanupStack::PushL( self );
+    self->ConstructL(aFile);
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// Destructor
+CBSIconFileProvider::~CBSIconFileProvider()
+    {
+    delete iFilename;
+    iFile.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CBSIconFileProvider::RetrieveIconFileHandleL
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CBSIconFileProvider::RetrieveIconFileHandleL(
+            RFile& aFile, const TIconFileType /*aType*/ )
+    {
+    aFile.Duplicate( iFile );
+    }
+
+// -----------------------------------------------------------------------------
+// CBSIconFileProvider::Finished
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CBSIconFileProvider::Finished()
+    {
+    // commit suicide because Avkon Icon Server said so
+    delete this;
+    }
+
+//  End of File