~nobuto/ubuntu/natty/synergy/merge-from-experimental

« back to all changes in this revision

Viewing changes to lib/arch/IArchLog.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Lutz
  • Date: 2003-10-31 19:36:30 UTC
  • Revision ID: james.westby@ubuntu.com-20031031193630-knbv79x5az7qh49y
Tags: upstream-1.0.14
ImportĀ upstreamĀ versionĀ 1.0.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 IARCHLOG_H
 
16
#define IARCHLOG_H
 
17
 
 
18
#include "IInterface.h"
 
19
 
 
20
//! Interface for architecture dependent logging
 
21
/*!
 
22
This interface defines the logging operations required by
 
23
synergy.  Each architecture must implement this interface.
 
24
*/
 
25
class IArchLog : public IInterface {
 
26
public:
 
27
        //! Log levels
 
28
        /*!
 
29
        The logging priority levels in order of highest to lowest priority.
 
30
        */
 
31
        enum ELevel {
 
32
                kERROR,                 //!< For serious or fatal errors
 
33
                kWARNING,               //!< For minor errors and warnings
 
34
                kNOTE,                  //!< For messages about notable events
 
35
                kINFO,                  //!< For informational messages
 
36
                kDEBUG                  //!< For debugging messages
 
37
        };
 
38
 
 
39
        //! @name manipulators
 
40
        //@{
 
41
 
 
42
        //! Open the log
 
43
        /*!
 
44
        Opens the log for writing.  The log must be opened before being
 
45
        written to.
 
46
        */
 
47
        virtual void            openLog(const char* name) = 0;
 
48
 
 
49
        //! Close the log
 
50
        /*!
 
51
        Close the log.
 
52
        */
 
53
        virtual void            closeLog() = 0;
 
54
 
 
55
        //! Write to the log
 
56
        /*!
 
57
        Writes the given string to the log with the given level.
 
58
        */
 
59
        virtual void            writeLog(ELevel, const char*) = 0;
 
60
 
 
61
        //@}
 
62
};
 
63
 
 
64
#endif