imservices/imfeatureplugin/srcimfrontend/srcimmanager/imfeaturesimp.cpp
changeset 0 e6b17d312c8b
equal deleted inserted replaced
-1:000000000000 0:e6b17d312c8b
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Implementation of MImFeatures
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #include <ximpcontext.h>
       
    20 #include "imapiobjbase.h"
       
    21 //#include "ximpidentityimp.h"
       
    22 #include "ximpcontextinternal.h"
       
    23 #include "imfeaturesimp.h"
       
    24 #include "imconversationimp.h"
       
    25 #include "imobjectfactoryimp.h"
       
    26 
       
    27 
       
    28 
       
    29 
       
    30 // ============================ MEMBER FUNCTIONS =============================
       
    31 
       
    32 // ---------------------------------------------------------------------------
       
    33 // CImFeaturesImp::NewL()
       
    34 // ---------------------------------------------------------------------------
       
    35 //
       
    36 EXPORT_C CImFeaturesImp* CImFeaturesImp::NewL(MXIMPContext* aContext)
       
    37     {
       
    38     CImFeaturesImp* self = new( ELeave ) CImFeaturesImp();
       
    39     CleanupStack::PushL( self );
       
    40     self->ConstructL(aContext);
       
    41     CleanupStack::Pop();
       
    42     return self;
       
    43     }
       
    44 
       
    45 // ---------------------------------------------------------------------------
       
    46 // Implement supported interface access.
       
    47 // ---------------------------------------------------------------------------
       
    48 //
       
    49 
       
    50 XIMPIMP_IF_BASE_GET_INTERFACE_BEGIN( CImFeaturesImp, 
       
    51                                      MImFeatures )
       
    52 XIMPIMP_IF_BASE_GET_INTERFACE_END()
       
    53 
       
    54 
       
    55 XIMPIMP_IF_BASE_GET_CONST_INTERFACE_BEGIN( CImFeaturesImp, 
       
    56                                            MImFeatures )
       
    57 XIMPIMP_IF_BASE_GET_INTERFACE_END()
       
    58 
       
    59 // ---------------------------------------------------------------------------
       
    60 // CImFeaturesImp::~CImFeaturesImp()
       
    61 // ---------------------------------------------------------------------------
       
    62 //
       
    63 CImFeaturesImp::~CImFeaturesImp()
       
    64     {
       
    65     delete iImConv;
       
    66     delete iImObjFactory;
       
    67     iCtxInternal = NULL;
       
    68     }
       
    69 
       
    70 
       
    71 // ---------------------------------------------------------------------------
       
    72 // CImFeaturesImp::CImFeaturesImp( CXIMPContextClientProxy& aCtxProxy )
       
    73 // ---------------------------------------------------------------------------
       
    74 //
       
    75 CImFeaturesImp::CImFeaturesImp()
       
    76     {
       
    77     }
       
    78 
       
    79 // ---------------------------------------------------------------------------
       
    80 // CImFeaturesImp::SetCtxL(MXIMPContext* aContext)
       
    81 // ---------------------------------------------------------------------------
       
    82 //
       
    83 void CImFeaturesImp::SetCtxL(MXIMPContext* aContext)
       
    84     {
       
    85     if(!aContext)
       
    86         User::Leave(KErrArgument);
       
    87     iCtxInternal = TXIMPGetInterface<MXIMPContextInternal>::From(*aContext,EReturnNullIfUnknown);
       
    88                        
       
    89     }
       
    90 
       
    91 // ---------------------------------------------------------------------------
       
    92 // CImFeaturesImp::ConstructL(MXIMPContext* aContext)
       
    93 // ---------------------------------------------------------------------------
       
    94 //
       
    95 void CImFeaturesImp::ConstructL(MXIMPContext* aContext)
       
    96     {
       
    97     SetCtxL(aContext);
       
    98     iImObjFactory = CImObjectFactoryImp::NewL();
       
    99     iImConv = CImConversationImp::NewL( *iCtxInternal );
       
   100 
       
   101     }
       
   102 
       
   103 
       
   104 // ---------------------------------------------------------------------------
       
   105 // CImFeaturesImp::ImObjectFactory()
       
   106 // ---------------------------------------------------------------------------
       
   107  MImObjectFactory& CImFeaturesImp::ImObjectFactory() const
       
   108     {
       
   109     return *iImObjFactory;
       
   110     }
       
   111 
       
   112 
       
   113 // ---------------------------------------------------------------------------
       
   114 // CImFeaturesImp::ImConversation()
       
   115 // ---------------------------------------------------------------------------
       
   116 //
       
   117  MImConversation& CImFeaturesImp::ImConversation() const
       
   118     {
       
   119     return *iImConv;
       
   120     }
       
   121 
       
   122 // ---------------------------------------------------------------------------
       
   123 // CImFeaturesImp::ImGroups() 
       
   124 // ---------------------------------------------------------------------------
       
   125 //
       
   126 // MImGroups& CImFeaturesImp::ImGroups() const
       
   127 //    {
       
   128     //return *iImConv;
       
   129 //    }
       
   130     
       
   131  // ---------------------------------------------------------------------------
       
   132 // CImFeaturesImp::ImInvtation() 
       
   133 // ---------------------------------------------------------------------------
       
   134 //
       
   135 // MImInvitation& CImFeaturesImp::ImInvtation() const
       
   136 //    {
       
   137     //return *iImConv;
       
   138 //    }
       
   139   
       
   140    // ---------------------------------------------------------------------------
       
   141 // CImFeaturesImp::ImSearch() 
       
   142 // ---------------------------------------------------------------------------
       
   143 //
       
   144 // MImSearch& CImFeaturesImp::ImSearch() const
       
   145 //    {
       
   146     //return *iImConv;
       
   147 //    }  
       
   148