source: trunk/synergy/lib/arch/IArchFile.h@ 3003

Last change on this file since 3003 was 2749, checked in by bird, 19 years ago

synergy v1.3.1 sources (zip).

File size: 1.7 KB
Line 
1/*
2 * synergy -- mouse and keyboard sharing utility
3 * Copyright (C) 2002 Chris Schoeneman
4 *
5 * This package is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * found in the file COPYING that should have accompanied this file.
8 *
9 * This package is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#ifndef IARCHFILE_H
16#define IARCHFILE_H
17
18#include "IInterface.h"
19#include "stdstring.h"
20
21//! Interface for architecture dependent file system operations
22/*!
23This interface defines the file system operations required by
24synergy. Each architecture must implement this interface.
25*/
26class IArchFile : public IInterface {
27public:
28 //! @name manipulators
29 //@{
30
31 //! Extract base name
32 /*!
33 Find the base name in the given \c pathname.
34 */
35 virtual const char* getBasename(const char* pathname) = 0;
36
37 //! Get user's home directory
38 /*!
39 Returns the user's home directory. Returns the empty string if
40 this cannot be determined.
41 */
42 virtual std::string getUserDirectory() = 0;
43
44 //! Get system directory
45 /*!
46 Returns the ussystem configuration file directory.
47 */
48 virtual std::string getSystemDirectory() = 0;
49
50 //! Concatenate path components
51 /*!
52 Concatenate pathname components with a directory separator
53 between them. This should not check if the resulting path
54 is longer than allowed by the system; we'll rely on the
55 system calls to tell us that.
56 */
57 virtual std::string concatPath(
58 const std::string& prefix,
59 const std::string& suffix) = 0;
60
61 //@}
62};
63
64#endif
Note: See TracBrowser for help on using the repository browser.