launcher/src/launcherdllelement.cpp
changeset 0 d6fe6244b863
equal deleted inserted replaced
-1:000000000000 0:d6fe6244b863
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 #include "launcherdllelement.h"
       
    19 #include "launchertraces.h"
       
    20 
       
    21 // ---------------------------------------------------------------------------
       
    22 
       
    23 CLauncherDLLElement::~CLauncherDLLElement()
       
    24     {
       
    25     LOGSTRING("Launcher: CLauncherDLLElement::~CLauncherDLLElement");    
       
    26     }
       
    27 
       
    28 // ---------------------------------------------------------------------------
       
    29 
       
    30 CLauncherDLLElement::CLauncherDLLElement()
       
    31     {    
       
    32     }
       
    33 
       
    34 // ---------------------------------------------------------------------------
       
    35 
       
    36 CLauncherDLLElement* CLauncherDLLElement::NewL()
       
    37     {
       
    38     LOGSTRING("Launcher: CLauncherDLLElement::NewL");
       
    39     CLauncherDLLElement* self = CLauncherDLLElement::NewLC();    
       
    40     CleanupStack::Pop();
       
    41     return self;
       
    42     }
       
    43 
       
    44 // ---------------------------------------------------------------------------
       
    45 
       
    46 CLauncherDLLElement* CLauncherDLLElement::NewLC()
       
    47     {
       
    48     LOGSTRING("Launcher: CLauncherDLLElement::NewLC");
       
    49     CLauncherDLLElement* self = new (ELeave) CLauncherDLLElement;
       
    50     CleanupStack::PushL(self);
       
    51     self->ConstructL();
       
    52     return self;
       
    53     }
       
    54 
       
    55 // ---------------------------------------------------------------------------
       
    56 
       
    57 void CLauncherDLLElement::ConstructL()
       
    58     {
       
    59     
       
    60     }
       
    61 
       
    62 // ---------------------------------------------------------------------------
       
    63    
       
    64 TBool CLauncherDLLElement::CompareL(const CLauncherDLLElement& aReferenceElement, RArray<TDifference>& aDifferenceList) const
       
    65     {
       
    66     LOGSTRING2("Launcher: CLauncherDLLElement::CompareL - DLLName: %S", &iName);
       
    67     if( iName != aReferenceElement.Name())
       
    68         {
       
    69         LOGSTRING("Launcher: CLauncherDLLElement::CompareL: ERROR - DLL names don't match.");
       
    70         User::Leave(KErrArgument);
       
    71         }
       
    72     
       
    73     TBool diff = EFalse;
       
    74             
       
    75     if( iUID1 != aReferenceElement.UID1()) 
       
    76         {
       
    77         diff = ETrue;
       
    78         aDifferenceList.Append(this->EDifference_UID1);      
       
    79         LOGSTRING3("Launcher: CLauncherDLLElement::CompareL - UID1s differs: %x vs. %x", iUID1, aReferenceElement.UID1());  
       
    80         }
       
    81     if( iUID2!= aReferenceElement.UID2()) 
       
    82         {
       
    83         diff = ETrue;
       
    84         aDifferenceList.Append(this->EDifference_UID2);        
       
    85         LOGSTRING3("Launcher: CLauncherDLLElement::CompareL - UID2s differs: %x vs. %x", iUID2, aReferenceElement.UID2());  
       
    86         }
       
    87     if( iUID3 != aReferenceElement.UID3()) 
       
    88         {
       
    89         diff = ETrue;
       
    90         aDifferenceList.Append(this->EDifference_UID3);        
       
    91         LOGSTRING3("Launcher: CLauncherDLLElement::CompareL - UID3s differs: %x vs. %x", iUID3, aReferenceElement.UID3());  
       
    92         }
       
    93     if( iSID != aReferenceElement.SID()) 
       
    94         {
       
    95         diff = ETrue;
       
    96         aDifferenceList.Append(this->EDifference_SID);        
       
    97         LOGSTRING3("Launcher: CLauncherDLLElement::CompareL - SIDs differs: %x vs. %x", iSID, aReferenceElement.SID());  
       
    98         }
       
    99     if( iCapability != aReferenceElement.Capability()) 
       
   100         {
       
   101         diff = ETrue;
       
   102         aDifferenceList.Append(this->EDifference_Capability);        
       
   103         LOGSTRING3("Launcher: CLauncherDLLElement::CompareL - Capabilities differs: %x vs. %x", iCapability, aReferenceElement.Capability());  
       
   104         }
       
   105     
       
   106     return diff;
       
   107     }
       
   108 
       
   109 // ---------------------------------------------------------------------------
       
   110 
       
   111 TFileName CLauncherDLLElement::Name() const
       
   112     {
       
   113     return iName;
       
   114     }
       
   115 
       
   116 // ---------------------------------------------------------------------------
       
   117 
       
   118 void CLauncherDLLElement::SetNameL(const TFileName& aName)
       
   119     {    
       
   120     iName.Copy(aName); 
       
   121     }
       
   122 
       
   123 // ---------------------------------------------------------------------------
       
   124 
       
   125 TUid CLauncherDLLElement::UID1() const
       
   126     {
       
   127     return iUID1;
       
   128     }
       
   129 
       
   130 // ---------------------------------------------------------------------------
       
   131 
       
   132 void CLauncherDLLElement::SetUID1L(TUid aUID1)
       
   133     {
       
   134     iUID1.iUid = aUID1.iUid;
       
   135     }
       
   136 
       
   137 // ---------------------------------------------------------------------------
       
   138 
       
   139 TUid CLauncherDLLElement::UID2() const
       
   140     {
       
   141     return iUID2;
       
   142     }
       
   143 
       
   144 // ---------------------------------------------------------------------------
       
   145 
       
   146 void CLauncherDLLElement::SetUID2L(TUid aUID2)
       
   147     {    
       
   148     iUID2 = aUID2;
       
   149     }
       
   150 
       
   151 // ---------------------------------------------------------------------------
       
   152 
       
   153 TUid CLauncherDLLElement::UID3() const
       
   154     {    
       
   155     return iUID3;
       
   156     }
       
   157 
       
   158 // ---------------------------------------------------------------------------
       
   159 
       
   160 void CLauncherDLLElement::SetUID3L(TUid aUID3)
       
   161     {    
       
   162     iUID3 = aUID3;
       
   163     }
       
   164 
       
   165 // ---------------------------------------------------------------------------
       
   166 
       
   167 TUid CLauncherDLLElement::SID() const
       
   168     {   
       
   169     return iSID;
       
   170     }
       
   171 
       
   172 // ---------------------------------------------------------------------------
       
   173 
       
   174 void CLauncherDLLElement::SetSIDL(TUid aSID)
       
   175     {    
       
   176     iSID = aSID;
       
   177     }
       
   178 
       
   179 // ---------------------------------------------------------------------------
       
   180 
       
   181 TUint32 CLauncherDLLElement::Capability() const
       
   182     {
       
   183     return iCapability;    
       
   184     }
       
   185 
       
   186 // ---------------------------------------------------------------------------
       
   187 
       
   188 void CLauncherDLLElement::SetCapabilityL(TUint32 aCapability)
       
   189     {
       
   190     iCapability = aCapability; 
       
   191     }