summaryrefslogtreecommitdiff
path: root/source/LCDriverInterface.h
blob: 6265b0d449db73a4ddbf5b5fb092ede0632bae11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*******************************************************************************
*
*    File name: LCDriverInterface.h
*      Project: LCDriver
*     Language: Visual C++
*  Description: Interface class.
*  Revision   : R1A
*
*
* Copyright (C) ST-Ericsson SA 2011
* License terms: 3-clause BSD license
*
*******************************************************************************/

#ifndef _CLCDRIVERINTERFACE_H_
#define _CLCDRIVERINTERFACE_H_

#include "LCDriverMethods.h"
#include "ObjectList.h"

/// <summary>
/// Interface class for functions agains loader command.
/// </summary>
struct CLCDriverInterface {
public:
    /// <summary>
    /// Constructor.
    /// </summary>
    CLCDriverInterface();

    /// <summary>
    /// Destructor.
    /// </summary>
    virtual ~CLCDriverInterface();

    // Public data members
    CLCDriverMethods *m_pObject;
    char m_szObjectId[25];
    bool isStarted;

    static CCriticalSectionObject InitializationCS;

    static CLCDriverMethods *FindObject(const char *interfaceId);
    static void ReleaseObject(CLCDriverMethods *object);
    static int AddObject(CLCDriverMethods *object, const char *interfaceId);
private:
    static CObjectList<CLCDriverMethods> ObjectList;
};

#endif // _CLCDRIVERINTERFACE_H_