Update contrib.
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
17 #include <kernel/kern_priv.h>
18 #include "display_dev.h"
19 #include "display_chan.h"
22 DECLARE_STANDARD_LDD()
24 return new DDisplayDevice;
28 DDisplayDevice::DDisplayDevice()
30 iVersion = TVersion(KDisplayChMajorVersionNumber,
31 KDisplayChMinorVersionNumber, KDisplayChBuildVersionNumber);
32 iParseMask=KDeviceAllowUnit;
36 DDisplayDevice::~DDisplayDevice()
41 TInt DDisplayDevice::Install()
43 return SetName(&RDisplayChannel::Name());
48 Called by the kernel's device driver framework to create a Logical Channel.
49 This is called in the context of the user thread (client) which requested the
50 creation of a Logical Channel (e.g. through a call to RBusLogicalChannel::DoCreate)
51 The thread is in a critical section.
53 @param aChannel Set to point to the created Logical Channel
55 @return KErrNone if successful, otherwise one of the other system wide error codes.
57 TInt DDisplayDevice::Create(DLogicalChannelBase*& aChannel)
59 aChannel = new DDisplayChannel();
61 return aChannel ? KErrNone : KErrNoMemory;
66 Return the drivers capabilities.
67 Called in the response to an RDevice::GetCaps() request.
69 @param aDes User-side descriptor to write capabilities information into
71 void DDisplayDevice::GetCaps(TDes8& aDes) const
73 // Create a capabilities object
74 DDisplayChannel::TCaps caps;
75 caps.iVersion = iVersion;
76 // Write it back to user memory
77 Kern::InfoCopy(aDes,reinterpret_cast<TUint8*>(&caps),sizeof(caps));