WvStreams
wvuid.h
1 /* -*- Mode: C++ -*-
2  * Worldvisions Weaver Software:
3  * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4  *
5  * Portable standins for getuid() and friends.
6  */
7 #ifndef __WVUID_H
8 #define __WVUID_H
9 
10 #include "wvstring.h"
11 
12 #if WIN32
13  typedef WvString wvuid_t;
14  #define WVUID_INVALID (WvString::null)
15 #else // not WIN32
16  #include <pwd.h>
17  typedef uid_t wvuid_t;
18  #define WVUID_INVALID ((wvuid_t)(-1))
19 #endif
20 
25 WvString wv_username_from_uid(wvuid_t uid);
26 
31 wvuid_t wv_uid_from_username(WvString username);
32 
42 wvuid_t wvgetuid();
43 
44 
45 #endif // __WVUID_H
WvString
WvString is an implementation of a simple and efficient printable-string class.
Definition: wvstring.h:330