summaryrefslogtreecommitdiff
path: root/drivers/staging/nmf-cm/cm/engine/repository_mgt/inc/repository_mgt.h
blob: d2c7185b24f3ff56538156e8d75ad7a18631b568 (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
51
52
53
54
55
/*
 * Copyright (C) ST-Ericsson SA 2010
 * Author: Jean-Philippe FASSINO <jean-philippe.fassino@stericsson.com> for ST-Ericsson.
 * License terms: GNU General Public License (GPL) version 2.
 */
/*!
 * \internal
 * \brief Component repository internal methods.
 *
 * \defgroup REPOSITORY_INTERNAL Component repository.
 */
#ifndef __INC_CM_REP_MGT_H
#define __INC_CM_REP_MGT_H

#include <cm/inc/cm_type.h>
#include <inc/nmf-limits.h>

/*!
 * \brief Identification of a component entry.
 * \ingroup REPOSITORY_INTERNAL
 */
typedef struct t_rep_component {
    t_dup_char             name;
	struct t_rep_component *prev;
	struct t_rep_component *next;
	t_elfdescription *elfhandle;                      //!< Must be last as data will be stored here
} t_rep_component;

/*!
 * \brief Search a component entry by name.
 *
 * \param[in]  name The name of the component to look for.
 * \param[out] component The corresponding component entry in the repository
 *
 * \retval t_cm_error
 *
 * \ingroup REPOSITORY_INTERNAL
 */
PUBLIC t_cm_error cm_REP_lookupComponent(const char *name, t_rep_component **component);

/*!
 * \brief Helper method that return the dataFile found in parameter or in the cache
 */
t_elfdescription* cm_REP_getComponentFile(t_dup_char templateName, t_elfdescription* elfhandle);

/*!
 * \brief Destroy the full repository (remove and free all components)
 *
 * \retval none
 *
 * \ingroup REPOSITORY_INTERNAL
 */
PUBLIC void cm_REP_Destroy(void);

#endif /* __INC_CM_REP_MGT_H */