1 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache 2.0 license that can be
3 // found in the LICENSE file.
5 #ifndef COMMON_UTILS_CLIST_HELPERS_H_
6 #define COMMON_UTILS_CLIST_HELPERS_H_
8 #include "pkgmgr/pkgmgr_parser.h"
10 /* NOTE: For *_x list types in pkgmgr-info, like privileges_x or privilege_x,
11 * this macro moves the current node to the head of the list.
12 * This LISTHEAD() macro is defined in pkgmgr_parser.h in pkgmgr-info package.
14 #define PKGMGR_LIST_MOVE_NODE_TO_HEAD(list, node) \
17 LISTHEAD(list, node); \
22 * Calculates size of C style list from any of its point
24 #define PKGMGR_LIST_LEN(list) \
28 PKGMGR_LIST_MOVE_NODE_TO_HEAD(list, node); \
36 #endif // COMMON_UTILS_CLIST_HELPERS_H_