hostenv.h #1

  • //
  • 2015-2/
  • guest/
  • mbedalov/
  • p4/
  • 2015-2/
  • sys/
  • hostenv.h
  • View
  • Commits
  • Open Download .zip Download (1 KB)
/*
 * Copyright 1995, 1996 Perforce Software.  All rights reserved.
 *
 * This file is part of Perforce - the FAST SCM System.
 */

/*
 * Hostenv.h - describe user's environment
 *
 * Fills result and returns for cwd/host/user.  Returns 0 if not found.
 *
 * Public methods:
 *
 *	HostEnv::GetCwd() - return the processes current working directory
 *	HostEnv::GetHost() - return the host name
 *	HostEnv::GetUser() - return the invoking user name
 *	HostEnv::GetTicketFile() - return the user ticket file location
 *	HostEnv::GetUid() - return the user id #, platform specific
 */

class Enviro;

class HostEnv {

    public:
	static void	GetCwdbyCS( StrBuf &result, int charset );
	int		GetCwd( StrBuf &result, Enviro * = 0 );
	int		GetHost( StrBuf &result );
	int		GetUser( StrBuf &result, Enviro * = 0 );
	int		GetTicketFile( StrBuf &result, Enviro * = 0 );
	int		GetTrustFile( StrBuf &result, Enviro * = 0 );
	int		GetUid( int &result );

    private:
	int		GetHomeName( const StrRef &, StrBuf &, 
			             Enviro *, const char *varName );
} ;
# Change User Description Committed
#1 19104 mbedalov "Forking branch 2015-2 of perforce_software-p4 to mbedalov-p4."
//guest/perforce_software/p4/2015-2/sys/hostenv.h
#1 18917 Liz Lam Submitting 15.2 source code.