ReactOS  0.4.15-dev-1386-g5cb9f87
CollectProgramsThread Struct Reference

Thread for collecting start menu entries. More...

#include <searchprogram.h>

Inheritance diagram for CollectProgramsThread:
Collaboration diagram for CollectProgramsThread:

Public Member Functions

 CollectProgramsThread (COLLECT_CALLBACK callback, HWND hwnd, void *para)
 
 ~CollectProgramsThread ()
 
int Run ()
 
void free_dirs ()
 

Public Attributes

bool _cache_valid
 

Protected Member Functions

void collect_programs (const ShellPath &path)
 

Protected Attributes

COLLECT_CALLBACK _callback
 
HWND _hwnd
 
void_para
 
ShellDirectoryStack _dirs
 

Detailed Description

Thread for collecting start menu entries.

Definition at line 35 of file searchprogram.h.

Constructor & Destructor Documentation

◆ CollectProgramsThread()

CollectProgramsThread::CollectProgramsThread ( COLLECT_CALLBACK  callback,
HWND  hwnd,
void para 
)
inline

Definition at line 37 of file searchprogram.h.

38  : _cache_valid(false),
40  _hwnd(hwnd),
41  _para(para)
42  {
43  }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
COLLECT_CALLBACK _callback
Definition: searchprogram.h:56
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44

◆ ~CollectProgramsThread()

CollectProgramsThread::~CollectProgramsThread ( )
inline

Definition at line 45 of file searchprogram.h.

46  {
47  free_dirs();
48  }

Member Function Documentation

◆ collect_programs()

void CollectProgramsThread::collect_programs ( const ShellPath path)
protected

Definition at line 55 of file searchprogram.cpp.

56 {
58  _dirs.push(dir);
59 
60  dir->smart_scan(SORT_NONE);
61 
62  for(Entry*entry=dir->_down; _alive && entry; entry=entry->_next) {
63  if (entry->_shell_attribs & SFGAO_HIDDEN)
64  continue;
65 
66  if (entry->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
67  collect_programs(entry->create_absolute_pidl());
68  else if (entry->_shell_attribs & SFGAO_LINK)
69  if (_alive)
71  }
72 }
shell folder entry
Definition: shellfs.h:53
COLLECT_CALLBACK _callback
Definition: searchprogram.h:56
void push(const value_type &__x)
Definition: _stack.h:86
unsigned int dir
Definition: maze.c:112
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
uint32_t entry
Definition: isohybrid.c:63
ShellFolder & GetDesktopFolder()
ShellDirectoryStack _dirs
Definition: searchprogram.h:59
void collect_programs(const ShellPath &path)
base of all file and directory entries
Definition: entries.h:82

Referenced by Run().

◆ free_dirs()

void CollectProgramsThread::free_dirs ( )

Definition at line 74 of file searchprogram.cpp.

75 {
76  while(!_dirs.empty()) {
78  dir->free_subentries();
79  _dirs.pop();
80  }
81 }
void pop()
Definition: _stack.h:87
bool empty() const
Definition: _stack.h:82
shell folder entry
Definition: shellfs.h:53
unsigned int dir
Definition: maze.c:112
ShellDirectoryStack _dirs
Definition: searchprogram.h:59
reference top()
Definition: _stack.h:84

Referenced by FindProgramDlg::Refresh(), and ~CollectProgramsThread().

◆ Run()

int CollectProgramsThread::Run ( void  )

Definition at line 36 of file searchprogram.cpp.

37 {
38  try {
40  } catch(COMException&) {
41  }
42 
43  if (_alive)
44  try {
46  } catch(COMException&) {
47  }
48 
49  if (_alive)
50  _cache_valid = true;
51 
52  return 0;
53 }
Retrieval of special shell folder paths.
Definition: shellclasses.h:981
#define CSIDL_COMMON_PROGRAMS
Definition: shlobj.h:2034
Exception with context information.
Definition: shellclasses.h:113
#define CSIDL_PROGRAMS
Definition: shlobj.h:2014
void collect_programs(const ShellPath &path)

Member Data Documentation

◆ _cache_valid

bool CollectProgramsThread::_cache_valid

Definition at line 53 of file searchprogram.h.

Referenced by FindProgramDlg::Notify(), FindProgramDlg::Refresh(), and Run().

◆ _callback

COLLECT_CALLBACK CollectProgramsThread::_callback
protected

Definition at line 56 of file searchprogram.h.

Referenced by collect_programs().

◆ _dirs

ShellDirectoryStack CollectProgramsThread::_dirs
protected

Definition at line 59 of file searchprogram.h.

Referenced by collect_programs(), and free_dirs().

◆ _hwnd

HWND CollectProgramsThread::_hwnd
protected

Definition at line 57 of file searchprogram.h.

Referenced by Run().

◆ _para

void* CollectProgramsThread::_para
protected

Definition at line 58 of file searchprogram.h.

Referenced by collect_programs().


The documentation for this struct was generated from the following files: