bluetoothengine/btaudioman/inc/basrvactivenotifier.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 16 Apr 2010 15:08:36 +0300
changeset 15 00f9ee97d895
parent 0 f63038272f30
permissions -rw-r--r--
Revision: 201011 Kit: 201015

/*
* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  The base active object declaration
*
*/


#ifndef C_BASRVACTIVENOTIFIER_H
#define C_BASRVACTIVENOTIFIER_H

//  INCLUDES
#include <e32base.h>
#include <btnotif.h>
#include "basrvactive.h"

class TBTDevAddr;

/**
 * An abstract Active Object.
 *
 * This class provides TRequestStatus for an async operation but it doesn't know the
 * detail of the request. CBasrvActive could be used to implement timers, P&S subscribes
 * that are "simple" enough operations.
 *
 * @since S60 v3.1
 */
class CBasrvActiveNotifier : public CBasrvActive
    {
public:
    static CBasrvActiveNotifier* NewL(MBasrvActiveObserver& aObserver, 
        CActive::TPriority aPriority, TInt aRequestId, const TBTDevAddr& aAddr, TBTGenericInfoNoteType aNote);

    virtual ~CBasrvActiveNotifier();

private:
    void GoActive();

private:
    void ConstructL();

    void DoCancel();

protected:
    CBasrvActiveNotifier(MBasrvActiveObserver& aObserver, 
        CActive::TPriority aPriority, TInt aRequestId, const TBTDevAddr& iAddr, TBTGenericInfoNoteType aNote);

    MBasrvActiveObserver& Observer();

private:
    RNotifier iNotifier;
    TBTGenericInfoNotiferParamsPckg iPckg;
    TBuf8<sizeof(TInt)> iNoResult;
    };

#endif  // C_BASRVACTIVE_H