Class ContentDirectory

java.lang.Object
org.cybergarage.util.ThreadCore
org.cybergarage.upnp.std.av.server.ContentDirectory
All Implemented Interfaces:
Runnable, org.cybergarage.upnp.control.ActionListener, org.cybergarage.upnp.control.QueryListener

public class ContentDirectory extends org.cybergarage.util.ThreadCore implements org.cybergarage.upnp.control.ActionListener, org.cybergarage.upnp.control.QueryListener
  • Field Details

  • Constructor Details

    • ContentDirectory

      public ContentDirectory(MediaServer mserver)
  • Method Details

    • getMediaServer

      public MediaServer getMediaServer()
    • lock

      public void lock()
    • unlock

      public void unlock()
    • updateSystemUpdateID

      public void updateSystemUpdateID()
    • getSystemUpdateID

      public int getSystemUpdateID()
    • getNextItemID

      public int getNextItemID()
    • getNextContainerID

      public int getNextContainerID()
    • getRootNode

      public org.cybergarage.upnp.std.av.server.object.container.RootNode getRootNode()
    • addPlugIn

      public boolean addPlugIn(org.cybergarage.upnp.std.av.server.object.Format format)
    • getFormat

      public org.cybergarage.upnp.std.av.server.object.Format getFormat(File file)
    • getFormat

      public org.cybergarage.upnp.std.av.server.object.Format getFormat(int n)
    • getNFormats

      public int getNFormats()
    • addSortCap

      public boolean addSortCap(org.cybergarage.upnp.std.av.server.object.SortCap sortCap)
    • getNSortCaps

      public int getNSortCaps()
    • getSortCap

      public org.cybergarage.upnp.std.av.server.object.SortCap getSortCap(int n)
    • getSortCap

      public org.cybergarage.upnp.std.av.server.object.SortCap getSortCap(String type)
    • addSearchCap

      public boolean addSearchCap(org.cybergarage.upnp.std.av.server.object.SearchCap searchCap)
    • getSearchCapList

      public org.cybergarage.upnp.std.av.server.object.SearchCapList getSearchCapList()
    • getNSearchCaps

      public int getNSearchCaps()
    • getSearchCap

      public org.cybergarage.upnp.std.av.server.object.SearchCap getSearchCap(int n)
    • getSearchCap

      public org.cybergarage.upnp.std.av.server.object.SearchCap getSearchCap(String type)
    • addDirectory

      public boolean addDirectory(Directory dir)
    • removeDirectory

      public boolean removeDirectory(String name)
    • removeAllDirectories

      public boolean removeAllDirectories()
    • getNDirectories

      public int getNDirectories()
    • getDirectory

      public Directory getDirectory(int n)
    • findContentNodeByID

      public org.cybergarage.upnp.std.av.server.object.ContentNode findContentNodeByID(String id)
    • actionControlReceived

      public boolean actionControlReceived(Action action)
      Description copied from interface: org.cybergarage.upnp.control.ActionListener
      Called when an action control request is received from a control point.

      Implementations should:

      • Read input argument values from the action
      • Perform the requested operation
      • Set output argument values in the action
      • Return true if successful, false on error

      If this method returns false, the action's status should be set using Action.setStatus(int, String) to provide error details to the control point.

      Specified by:
      actionControlReceived in interface org.cybergarage.upnp.control.ActionListener
      Parameters:
      action - the action being invoked, containing input arguments
      Returns:
      true if the action was executed successfully, false if an error occurred
    • queryControlReceived

      public boolean queryControlReceived(StateVariable stateVar)
      Specified by:
      queryControlReceived in interface org.cybergarage.upnp.control.QueryListener
    • contentExportRequestRecieved

      public void contentExportRequestRecieved(org.cybergarage.http.HTTPRequest httpReq)
    • getInterfaceAddress

      public String getInterfaceAddress()
    • getHTTPPort

      public int getHTTPPort()
    • getContentExportURL

      public String getContentExportURL(String id)
    • getContentImportURL

      public String getContentImportURL(String id)
    • setSystemUpdateInterval

      public void setSystemUpdateInterval(long itime)
    • getSystemUpdateIDInterval

      public long getSystemUpdateIDInterval()
    • setContentUpdateInterval

      public void setContentUpdateInterval(long itime)
    • getContentUpdateInterval

      public long getContentUpdateInterval()
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class org.cybergarage.util.ThreadCore