[BACK]Return to Directory.h CVS log [TXT][DIR] Up to [Development] / fam / fam

Annotation of fam/fam/Directory.h, Revision 1.1

1.1     ! trev        1: //  Copyright (C) 1999 Silicon Graphics, Inc.  All Rights Reserved.
        !             2: //
        !             3: //  This program is free software; you can redistribute it and/or modify it
        !             4: //  under the terms of version 2 of the GNU General Public License as
        !             5: //  published by the Free Software Foundation.
        !             6: //
        !             7: //  This program is distributed in the hope that it would be useful, but
        !             8: //  WITHOUT ANY WARRANTY; without even the implied warranty of
        !             9: //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  Further, any
        !            10: //  license provided herein, whether implied or otherwise, is limited to
        !            11: //  this program in accordance with the express provisions of the GNU
        !            12: //  General Public License.  Patent licenses, if any, provided herein do not
        !            13: //  apply to combinations of this program with other product or programs, or
        !            14: //  any other product whatsoever.  This program is distributed without any
        !            15: //  warranty that the program is delivered free of the rightful claim of any
        !            16: //  third person by way of infringement or the like.  See the GNU General
        !            17: //  Public License for more details.
        !            18: //
        !            19: //  You should have received a copy of the GNU General Public License along
        !            20: //  with this program; if not, write the Free Software Foundation, Inc., 59
        !            21: //  Temple Place - Suite 330, Boston MA 02111-1307, USA.
        !            22:
        !            23: #ifndef Directory_included
        !            24: #define Directory_included
        !            25:
        !            26: #include "ClientInterest.h"
        !            27:
        !            28: class DirEntry;
        !            29: class DirectoryScanner;
        !            30:
        !            31: //  A Directory represents a directory that we are monitoring.
        !            32: //  It's derived from ClientInterest.  See the comments in
        !            33: //  ClientInterest and Interest.
        !            34: //
        !            35: //  Each Directory has a linked list of DirEntries.  The DirEntries
        !            36: //  are stored in the order they're returned by readdir(2).
        !            37:
        !            38: class Directory : public ClientInterest {
        !            39:
        !            40: public:
        !            41:
        !            42:     Directory(const char *name, Client *, Request, const Cred&);
        !            43:     ~Directory();
        !            44:
        !            45:     virtual void resume();
        !            46:
        !            47:     Type type() const;
        !            48:     Interest *find_name(const char *);
        !            49:     virtual bool do_scan();
        !            50:     static bool chdir_root();
        !            51:
        !            52:     bool chdir();
        !            53:
        !            54: #if HAVE_SGI_NOHANG
        !            55:     void unhang();
        !            56: #endif
        !            57:
        !            58: private:
        !            59:
        !            60:     enum { SCANNING = 1 << 0, RESCAN_SCHEDULED = 1 << 1 };
        !            61:
        !            62:     //  Instance Variable
        !            63:
        !            64:     DirEntry *entries;
        !            65:
        !            66:     pid_t unhangPid;
        !            67:
        !            68:     //  Class Variable
        !            69:
        !            70:     static Directory *current_dir;
        !            71:
        !            72:     //  Class Methods
        !            73:
        !            74:     static void new_done_handler(void *);
        !            75:     static void scan_done_handler(void *);
        !            76:     static void scan_task(void *);
        !            77:
        !            78: friend class DirEntry;
        !            79: friend class DirectoryScanner;
        !            80:
        !            81: };
        !            82:
        !            83: #endif /* !Directory_included */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>