00001 /* 00002 * Copyright 2004 Martin Fuchs 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with this library; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 */ 00018 00019 00020 // 00021 // Explorer clone 00022 // 00023 // regfs.h 00024 // 00025 // Martin Fuchs, 31.01.2004 00026 // 00027 00028 00029 /// Registry entry 00030 struct RegEntry : public Entry 00031 { 00032 RegEntry(Entry* parent) : Entry(parent, ET_REGISTRY) {} 00033 00034 protected: 00035 RegEntry() : Entry(ET_REGISTRY) {} 00036 00037 virtual bool get_path(PTSTR path, size_t path_count) const; 00038 virtual BOOL launch_entry(HWND hwnd, UINT nCmdShow); 00039 }; 00040 00041 00042 /// Registry key entry 00043 struct RegDirectory : public RegEntry, public Directory 00044 { 00045 RegDirectory(Entry* parent, LPCTSTR path, HKEY hKeyRoot); 00046 00047 ~RegDirectory() 00048 { 00049 free(_path); 00050 _path = NULL; 00051 } 00052 00053 virtual void read_directory(int scan_flags=0); 00054 virtual const void* get_next_path_component(const void*) const; 00055 virtual Entry* find_entry(const void*); 00056 00057 protected: 00058 HKEY _hKeyRoot; 00059 }; 00060 00061 00062 /// Registry key entry 00063 struct RegistryRoot : public RegEntry, public Directory 00064 { 00065 RegistryRoot() 00066 { 00067 } 00068 00069 RegistryRoot(Entry* parent, LPCTSTR path) 00070 : RegEntry(parent) 00071 { 00072 _path = _tcsdup(path); 00073 } 00074 00075 ~RegistryRoot() 00076 { 00077 free(_path); 00078 _path = NULL; 00079 } 00080 00081 virtual void read_directory(int scan_flags=0); 00082 };
ROS Explorer Source Code Documentation
generated on 02.01.2013 by ![]() |