/usr/include/elektra/kdbextension.h is in libelektra-dev 0.8.7-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | /***************************************************************************
kdbextension.h - Optional Methods which sit on top of elektra
-------------------
begin : Mon Dec 29 2003
copyright : (C) 2010 by Markus Raab
email : elektra@markus-raab.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the BSD License (revised). *
*
* It is debatable if these functions belong to a general purpose key
* database. However there are here to make working with Elektra more
* easy or just as backwards compatability.
*
* They might be removed in a later version.
*
* They are not part of the documentation.
* *
***************************************************************************/
#ifndef KDBEXTENSION_H
#define KDBEXTENSION_H
#include "kdb.h"
#ifdef __cplusplus
namespace ckdb {
extern "C" {
#endif
/* Conveniences Methods regarding Meta Info */
uid_t keyGetUID(const Key *key);
int keySetUID(Key *key, uid_t uid);
gid_t keyGetGID(const Key *key);
int keySetGID(Key *key, gid_t gid);
int keySetDir(Key *key);
mode_t keyGetMode(const Key *key);
int keySetMode(Key *key, mode_t mode);
int keyIsDir(const Key *key);
time_t keyGetATime(const Key *key);
int keySetATime(Key *key, time_t atime);
time_t keyGetMTime(const Key *key);
int keySetMTime(Key *key, time_t mtime);
time_t keyGetCTime(const Key *key);
int keySetCTime(Key *key, time_t ctime);
const char *keyOwner(const Key *key);
ssize_t keyGetOwnerSize(const Key *key);
ssize_t keyGetOwner(const Key *key, char *returned, size_t maxSize);
ssize_t keySetOwner(Key *key, const char *owner);
const char *keyComment(const Key *key);
ssize_t keyGetCommentSize(const Key *key);
ssize_t keyGetComment(const Key *key, char *returnedDesc, size_t maxSize);
ssize_t keySetComment(Key *key, const char *newDesc);
int elektraKeyCmpOrder(const Key *a, const Key *b);
/* Name Manipulation Methods */
ssize_t keyNameGetRootNameSize(const char *keyname);
ssize_t keyNameGetBaseNameSize(const char *keyname);
ssize_t keyNameGetFullRootNameSize(const char *keyname);
ssize_t keyGetRootNameSize(const Key *key);
ssize_t keyGetRootName(const Key *key, char *returned, size_t maxSize);
ssize_t keyGetFullRootNameSize(const Key *key);
ssize_t keyGetFullRootName(const Key *key, char *returned, size_t maxSize);
ssize_t keyGetParentName(const Key *key, char *returned, size_t maxSize);
ssize_t keyGetParentNameSize(const Key *key);
/* Conveniences Methods for Making Tests */
int keyIsBelow(const Key *key, const Key *check);
int keyIsDirectBelow(const Key *key, const Key *check);
int keyIsSystem(const Key *key);
int keyIsUser(const Key *key);
int keyNameIsSystem(const char *keyname);
int keyNameIsUser(const char *keyname);
int keyIsInactive(const Key *key);
/***************************************
*
* Functions which might be reintroduced
*
**************************************/
/*****************
* Namespaces
*****************/
/*
* Elektra currently supported Key namespaces.
*
* @ingroup key
* @see kdbGet(), keyGetNamespace(), keyNameGetNamespace()
*/
enum {
KEY_NS_SYSTEM=1, /*!< The @p system keys */
KEY_NS_USER=2 /*!< The @p user keys */
};
int keyGetNamespace(const Key *key);
int keyNameGetNamespace(const char *keyname);
/*****************
* Misc Functions
*****************/
keyswitch_t keyCompare(const Key *key1, const Key *key2);
ssize_t ksGetCommonParentName(const KeySet *ks,char *returnedCommonParent,
size_t maxSize);
/*****************
* Allocation
*****************/
int ksNeedSort(const KeySet *ks);
int ksResize(KeySet *ks, size_t size);
size_t ksGetAlloc(const KeySet *ks);
#ifdef __cplusplus
}
}
#endif
#endif
|