imservices/imfeatureplugin/srcimdatamodel/imconversation/conversationsubscriptionitem.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:  IM Service Connection Conversation subscription implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <badesca.h>
       
    20 
       
    21 #include "ximpimitemparent.h"
       
    22 //#include "ximppanics.h"
       
    23 //#include "ximppsccontext.h"
       
    24 //#include "ximpobjecthelpers.h"
       
    25 #include "imtypehelpers.h"
       
    26 #include "imconversationeventimp.h"
       
    27 //#include "ximpidentityimp.h"
       
    28 //#include "ximpdatasubscriptionstateimp.h"
       
    29 #include "conversationsubscriptionitem.h"
       
    30 
       
    31 // ---------------------------------------------------------------------------
       
    32 // CConversationSubscriptionItem::CConversationSubscriptionItem()
       
    33 // ---------------------------------------------------------------------------
       
    34 //
       
    35 CConversationSubscriptionItem::CConversationSubscriptionItem( MXIMPItemParentBase& aParent )
       
    36 : CXIMPSubscriptionItemBase( aParent )
       
    37     {
       
    38     }
       
    39 
       
    40 
       
    41 // ---------------------------------------------------------------------------
       
    42 // CConversationSubscriptionItem::ConstructL()
       
    43 // ---------------------------------------------------------------------------
       
    44 //
       
    45 void CConversationSubscriptionItem::ConstructL()
       
    46     {
       
    47     }
       
    48 
       
    49 
       
    50 // ---------------------------------------------------------------------------
       
    51 // CConversationSubscriptionItem::NewL()
       
    52 // ---------------------------------------------------------------------------
       
    53 //
       
    54 CConversationSubscriptionItem* CConversationSubscriptionItem::NewLC( MXIMPItemParentBase& aParent )
       
    55     {
       
    56     CConversationSubscriptionItem* self = new( ELeave ) CConversationSubscriptionItem( aParent );
       
    57     CleanupClosePushL( *self );
       
    58     self->ConstructL();
       
    59     return self;
       
    60     }
       
    61 
       
    62 
       
    63 // ---------------------------------------------------------------------------
       
    64 // CConversationSubscriptionItem::~CConversationSubscriptionItem()
       
    65 // ---------------------------------------------------------------------------
       
    66 //
       
    67 EXPORT_C CConversationSubscriptionItem::~CConversationSubscriptionItem()
       
    68     {
       
    69     MXIMPIMItemParent* imCache = static_cast<MXIMPIMItemParent*>(iParent.GetInterface(IM_ITEM_PARENT));
       
    70     imCache->RemoveMe( this );
       
    71     }
       
    72 
       
    73 // ---------------------------------------------------------------------------
       
    74 // From MXIMPSubscriptionItem class.
       
    75 // CConversationSubscriptionItem::SynthesiseSubscriptionEventTo()
       
    76 // ---------------------------------------------------------------------------
       
    77 //
       
    78 void CConversationSubscriptionItem::SynthesiseSubscriptionEventToL(
       
    79         MXIMPPscContext* aContext, TBool /*aForceEvent*/ )
       
    80     {
       
    81 
       
    82     CImConversationEventImp* newEvent = CImConversationEventImp::NewLC( iConvinfo );      
       
    83     if( newEvent )
       
    84         {
       
    85          MXIMPIMItemParent* imCache = static_cast<MXIMPIMItemParent*>(iParent.GetInterface(IM_ITEM_PARENT));
       
    86         //static_cast<MXIMPIMItemParent&>(iParent).AddEventL( *newEvent, aContext ); 
       
    87          imCache->AddEventL( *newEvent, aContext ); 
       
    88         }
       
    89     CleanupStack::PopAndDestroy( newEvent ); //newEvent
       
    90     }
       
    91 
       
    92 
       
    93 // ---------------------------------------------------------------------------
       
    94 // CConversationSubscriptionItem::SetNewListL()
       
    95 // ---------------------------------------------------------------------------
       
    96 //
       
    97 EXPORT_C void CConversationSubscriptionItem::SetConversationInfoL(CImConversationInfoImp* aConvinfo)
       
    98     {
       
    99     iConvinfo = aConvinfo;
       
   100     }
       
   101 // ---------------------------------------------------------------------------
       
   102 // CGroupListSubscriptionItem::CleanExpired()
       
   103 // ---------------------------------------------------------------------------
       
   104 //
       
   105 void CConversationSubscriptionItem::CleanExpired()
       
   106     {
       
   107     
       
   108     }
       
   109  
       
   110     
       
   111 // End of file