Brecham.Obex — An OBEX library for the .NET Framework

ObexFolderListing Class

Holds the items from a parsed OBEX Folder-listing XML document. As returned by ObexClientSession.GetFolderListing, and ObexFolderListingParser.GetAllItems. Provides access to a list of all the items, and also access to lists of the component folders, files, and whether the list contains a parent-folder.

For a list of all members of this type, see ObexFolderListing Members.

System.Object
   Brecham.Obex.Objects.ObexFolderListing

[Visual Basic]
Public Class ObexFolderListing
[C#]
public class ObexFolderListing

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Example

[Visual Basic]
Private Sub DisplayFolderListing(sess As ObexClientSession)
   Dim xmlFl As Stream = sess.Get(Nothing, ObexConstant.Type.FolderListing)
   Dim parser As New ObexFolderListingParser(xmlFl)
   Dim listing As ObexFolderListing = parser.GetAllItems
   If (listing.HasParentFolder) Then Console.WriteLine("<DIR> ..")
   For Each folder As ObexFolderItem In listing.Folders
      Console.WriteLine("<DIR> {0}", folder.Name)
   Next
   For Each file As ObexFileItem In listing.Files
      Console.WriteLine("      {0}", file.Name)
   Next
End Sub
Note: This example shows the separate requesting the Get of the listing, and then its parsing. These two steps are combined in the method ObexClientSession.GetFolderListing.

Requirements

Namespace: Brecham.Obex.Objects

Assembly: Brecham.Obex (in Brecham.Obex.dll)

See Also

ObexFolderListing Members | Brecham.Obex.Objects Namespace