VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "ISearch"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False

' ISearch

' Public interface for the cSearch class

' All callbacks must be Implemented by the client

Public Enum eObjectType
   eFile
   eFolder
   eZippedFile
   eZippedFolder
   ePackedFile
   ePackedFolder
   #If False Then
     Dim eFile, eFolder, eZippedFile, eZippedFolder, ePackedFile, ePackedFolder
   #End If
End Enum

Public Sub CatalogFolders(ByVal ParentIdx As Long, ByVal Count As Long)
'
End Sub

Public Sub CatalogNewItem(ByVal ParentIdx As Long, ByVal ItemIdx As Long, ByVal eType As eObjectType)
'
End Sub

Public Sub MoveFolder(ByVal ParentIdx As Long, ByVal NewParentIdx As Long, ByVal FolderIdx As Long)
'
End Sub

Public Sub BlockFolder(ByVal FolderIdx As Long, ByVal IsBlocked As Boolean)
'
End Sub

Public Sub UpdateFile(ByVal FileIdx As Long)
'
End Sub

Public Sub UpdateMedia(ByVal DriveIdx As Long, ByVal NewVolume As Long)
'
End Sub

Public Sub InvalidateFolders(ByVal ParentIdx As Long, ByVal Count As Long)
'
End Sub

Public Sub InvalidateItem(ByVal ItemIdx As Long, ByVal eType As eObjectType)
'
End Sub

Public Sub RenameItem(ByVal ItemIdx As Long, ByVal eType As eObjectType)
'
End Sub

Public Sub FoundItem(ByVal ItemIdx As Long, ByVal eType As eObjectType)
'
End Sub

Public Sub Processing(message As String)
'
End Sub

Public Sub ZipErrorLog(message As String)
'
End Sub

' In the client:

'Private cSearch As cSearch
'Implements ISearch
'
'Private Sub Command2_Click()
'    Set cSearch = New cSearch
'    cSearch.AttachISearch Me
'
'    i = cSearch.DriveIndexFromChar("C:")
'    cSearch.Catalog i, 3
'    cSearch.SearchWithinZipsAlso = True
'    cSearch.FindFiles i, "*.txt"
'
'    Set cSearch = Nothing
'End Sub
'
' ALL CALLBACKS MUST BE IMPLEMENTED
'
'Private Sub ISearch_CatalogFolders(ByVal ParentIdx As Long, ByVal Count As Long)
'   Dim i As Long
'    Do Until i = Count
'       j = cSearch.ChildIndex(ParentIdx, i, eFolder)
'      'TreeAdd ParentIdx & "_key", j & "_key", cSearch.ItemName(j, eFolder))
'      'Index = Val(sTreeKey)
'       Text1.SelText = cSearch.ItemPathName(j, eFolder)) & vbCrLf
'       i = i + 1&
'    Loop
'End Sub
'
'Private Sub ISearch_FoundItem(ByVal idx As Long, ByVal eType As eObjectType)
'    Static j As Long, k As Long
'
'    If Not j = cSearch.ItemParentIndex(idx, eType) Then
'       j = cSearch.ItemParentIndex(idx, eType)
'       Text1.SelText = cSearch.ItemPathName(j, eFolder) & vbCrLf
'       'Text1.SelText = cSearch.ItemParentPath(idx, eType) & vbCrLf
'    End If
'
'    Select Case eType
'        Case eZippedFile, eZippedFolder
'            If Not k = cSearch.ItemParentIndex(idx, eZippedFile) Then
'               k = cSearch.ItemParentIndex(idx, eZippedFile)
'               Text1.SelText = cSearch.ItemPathName(k, eFile) & vbCrLf
'               'Text1.SelText = cSearch.ItemParentPath(idx, eZippedFile) & vbCrLf
'            End If
'    End Select
'
'    If eType <> eFolder Then Text1.SelText = "    "
'
'    Text1.SelText = cSearch.ItemName(idx, eType) & vbCrLf
'End Sub
'
'Private Sub ISearch_InvalidateFolders(ByVal ParentIdx As Long, ByVal Count As Long)
'    Do While Count
'        Count = Count - 1&
'       'TreeDelete cSearch.ChildIndex(ParentIdx, Count, eFolder) & "_key"
'       'ListV.Clear
'    Loop
'    lvw.ListItems.Clear
'    lvw.Refresh
'End Sub
'
'Private Sub ISearch_Processing(Message As String)
'    Label2.Caption = Message
'    Label2.Refresh
'End Sub
'
'Private Sub ISearch_ZipErrorLog(Message As String)
'    Text1.SelText = Message & vbCrLf
'End Sub

