sysanadatacapture/piprofiler/piprofiler_api/inc/WriterPluginInterface.inl
author Matti Laitinen <matti.t.laitinen@nokia.com>
Thu, 11 Feb 2010 15:52:57 +0200
changeset 1 3ff3fecb12fe
permissions -rw-r--r--
Add initial version of PI Profiler under EPL
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     1
/*
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     8
*
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    11
*
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    12
* Contributors:
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    13
*
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    14
* Description:  
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    15
*
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    16
*/
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    17
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    18
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    19
inline CWriterPluginInterface::CWriterPluginInterface()
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    20
    : iOrder( KWriterPluginNotIndexed ) 
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    21
    {
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    22
        
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    23
    }
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    24
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    25
// -----------------------------------------------------------------------------
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    26
// CWriterPluginInterface::~CWriterPluginInterface()
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    27
// Destructor.
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    28
// -----------------------------------------------------------------------------
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    29
//
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    30
inline CWriterPluginInterface::~CWriterPluginInterface()
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    31
    {
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    32
    // We don't unload the plugin object here. The loader
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    33
    // has to do this for us. Without this kind of destruction idiom, 
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    34
    // the view framework can potentially unload an ECOM plugin dll whilst 
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    35
    // there are still child views (Created by the plugin) that are registered 
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    36
    // with the view framework. If this occurs, the plugin code segment isn't 
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    37
    // loaded anymore and so there is no way to run the subsequent destructor 
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    38
    // code => exception.
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    39
    
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    40
    // If in the NewL some memory is reserved for member data, it must be
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    41
    // released here. This interface does not have any instance variables so
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    42
    // no need to delete anything.
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    43
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    44
    // Inform the ECOM framework that this specific instance of the
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    45
    // interface has been destroyed.
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    46
    REComSession::DestroyedImplementation(iDtor_ID_Key);
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    47
    }
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    48
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    49
inline CWriterPluginInterface* CWriterPluginInterface::NewL(const TUid aImplementationUid, TAny* aInitParams)
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    50
    {
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    51
    // Define options, how the default resolver will find appropriate
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    52
    // implementation.
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    53
    return REINTERPRET_CAST(CWriterPluginInterface*, 
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    54
                            REComSession::CreateImplementationL(aImplementationUid,
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    55
                                                                _FOFF( CWriterPluginInterface, iDtor_ID_Key ),
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    56
                                                                aInitParams)); 
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    57
    }
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    58
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    59
inline void CWriterPluginInterface::ListAllImplementationsL(RImplInfoPtrArray& aImplInfoArray)
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    60
    {
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    61
    REComSession::ListImplementationsL(KWriterPluginInterfaceUid, aImplInfoArray);
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    62
    }
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    63
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    64
inline void CWriterPluginInterface::SetOrder( TInt aOrder )
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    65
    {
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    66
    iOrder = aOrder;
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    67
    }
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    68
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    69
// end of file