#include "config.h"
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <string>
#include <YCP.h>
#include <ycp/y2log.h>
#include <ycp/YCPMap.h>
#include "ResolverAgent.h"
Classes | |
struct | info_entry |
(ResolverAgent) More... | |
Functions | |
static const char * | findKey (const char *tag) |
bool | allowedInfoKey (const char *key) |
static char * | nextWhitespace (const char *lptr) |
static char * | eatWhitespaces (const char *lptr) |
static int | fillCache (const char *filename) |
static int | flushCache (const char *filename) |
static int | allowedKey (const char *key) |
Variables | |
static YCPMap | localCache |
static bool | cacheDirty = false |
static bool | cacheValid = false |
static bool | writeHeader = false |
static const char * | resolver_keys [] |
static const info_entry | headers [] |
bool allowedInfoKey | ( | const char * | key | ) |
Referenced by flushCache(), and ResolverAgent::Write().
static int allowedKey | ( | const char * | key | ) | [static] |
static char* eatWhitespaces | ( | const char * | lptr | ) | [static] |
Referenced by fillCache().
static int fillCache | ( | const char * | filename | ) | [static] |
References YCPList::add(), YCPMap::add(), cacheValid, eatWhitespaces(), findKey(), YCPElement::isNull(), nextWhitespace(), YCPMap::value(), y2debug, y2error, and y2warning.
Referenced by ResolverAgent::Read(), and ResolverAgent::Write().
static const char* findKey | ( | const char * | tag | ) | [static] |
static int flushCache | ( | const char * | filename | ) | [static] |
References allowedInfoKey(), YCPMap::begin(), cacheDirty, cacheValid, YCPMap::end(), YCPElement::isNull(), YCPList::size(), YCPList::value(), YCPMap::value(), writeHeader, y2debug, y2error, and y2warning.
Referenced by ResolverAgent::Write(), and ResolverAgent::~ResolverAgent().
static char* nextWhitespace | ( | const char * | lptr | ) | [static] |
Referenced by fillCache().
bool cacheDirty = false [static] |
Referenced by flushCache(), ResolverAgent::Write(), and ResolverAgent::~ResolverAgent().
bool cacheValid = false [static] |
Referenced by fillCache(), flushCache(), ResolverAgent::otherCommand(), and ResolverAgent::~ResolverAgent().
const info_entry headers[] [static] |
Initial value:
{ {"modified", "# Modified_by:"}, {"backup", "# Backup:"}, {"process", "# Process: "}, {"process_id", "# Process_id: "}, {"script", "# Script:"}, {"saveto", "# Saveto:"}, {"info", "# Info:"}, {0, 0} }
YCPMap localCache [static] |
const char* resolver_keys[] [static] |
Initial value:
{ "search", "nameserver", "domain", "sortlist", "options", 0 }
Referenced by allowedKey(), and ResolverAgent::Dir().
bool writeHeader = false [static] |
Referenced by flushCache(), and ResolverAgent::Write().