org.gudy.azureus2.plugins.sharing
Interface ShareManager

All Known Implementing Classes:
ShareManagerImpl

public interface ShareManager


Field Summary
static java.lang.String PR_NETWORKS
           
static java.lang.String PR_PERSISTENT
           
static java.lang.String PR_PERSONAL
           
static java.lang.String PR_TAGS
           
static java.lang.String PR_USER_DATA
           
 
Method Summary
 ShareResourceDir addDir(java.io.File dir)
           
 ShareResourceDir addDir(java.io.File dir, java.util.Map<java.lang.String,java.lang.String> properties)
           
 ShareResourceDirContents addDirContents(java.io.File dir, boolean recursive)
           
 ShareResourceDirContents addDirContents(java.io.File dir, boolean recursive, java.util.Map<java.lang.String,java.lang.String> properties)
           
 ShareResourceFile addFile(java.io.File file)
           
 ShareResourceFile addFile(java.io.File file, java.util.Map<java.lang.String,java.lang.String> properties)
           
 void addListener(ShareManagerListener listener)
           
 void cancelOperation()
          adding shares can take a long time due to the torrent creation process.
 ShareResource getShare(java.io.File file_or_dir)
          returns null if share not defined
 ShareResource[] getShares()
           
 void initialise()
           
 boolean isInitialising()
           
 void removeListener(ShareManagerListener listener)
           
 

Field Detail

PR_PERSONAL

static final java.lang.String PR_PERSONAL
See Also:
Constant Field Values

PR_NETWORKS

static final java.lang.String PR_NETWORKS
See Also:
Constant Field Values

PR_TAGS

static final java.lang.String PR_TAGS
See Also:
Constant Field Values

PR_USER_DATA

static final java.lang.String PR_USER_DATA
See Also:
Constant Field Values

PR_PERSISTENT

static final java.lang.String PR_PERSISTENT
See Also:
Constant Field Values
Method Detail

initialise

void initialise()
                throws ShareException
Throws:
ShareException

isInitialising

boolean isInitialising()

getShares

ShareResource[] getShares()

getShare

ShareResource getShare(java.io.File file_or_dir)
returns null if share not defined

Parameters:
file_or_dir -
Returns:

addFile

ShareResourceFile addFile(java.io.File file)
                          throws ShareException,
                                 ShareResourceDeletionVetoException
Throws:
ShareException
ShareResourceDeletionVetoException

addFile

ShareResourceFile addFile(java.io.File file,
                          java.util.Map<java.lang.String,java.lang.String> properties)
                          throws ShareException,
                                 ShareResourceDeletionVetoException
Throws:
ShareException
ShareResourceDeletionVetoException

addDir

ShareResourceDir addDir(java.io.File dir)
                        throws ShareException,
                               ShareResourceDeletionVetoException
Throws:
ShareException
ShareResourceDeletionVetoException

addDir

ShareResourceDir addDir(java.io.File dir,
                        java.util.Map<java.lang.String,java.lang.String> properties)
                        throws ShareException,
                               ShareResourceDeletionVetoException
Throws:
ShareException
ShareResourceDeletionVetoException

addDirContents

ShareResourceDirContents addDirContents(java.io.File dir,
                                        boolean recursive)
                                        throws ShareException,
                                               ShareResourceDeletionVetoException
Throws:
ShareException
ShareResourceDeletionVetoException

addDirContents

ShareResourceDirContents addDirContents(java.io.File dir,
                                        boolean recursive,
                                        java.util.Map<java.lang.String,java.lang.String> properties)
                                        throws ShareException,
                                               ShareResourceDeletionVetoException
Throws:
ShareException
ShareResourceDeletionVetoException

cancelOperation

void cancelOperation()
adding shares can take a long time due to the torrent creation process. The current activity can be interrupted by calling this function, in which case the original activity will fail with a ShareException


addListener

void addListener(ShareManagerListener listener)

removeListener

void removeListener(ShareManagerListener listener)