com.aelitis.azureus.core.cnetwork
Interface ContentNetwork

All Known Implementing Classes:
ContentNetworkImpl, ContentNetworkVuze, ContentNetworkVuzeGeneric

public interface ContentNetwork


Field Summary
static long CONTENT_NETWORK_RFN
          You should normally NOT refer explicitly to this constant without consideration as we don't want network-specific code proliferating
static long CONTENT_NETWORK_UNKNOWN
           
static long CONTENT_NETWORK_VHDNL
           
static long CONTENT_NETWORK_VUZE
           
static java.lang.String PP_ACTIVE
           
static java.lang.String PP_AUTH_PAGE_SHOWN
           
static java.lang.String PP_IS_CUSTOMIZATION
           
static java.lang.String PP_SHOW_IN_MENU
           
static java.lang.String PP_SOURCE_REF
           
static int PROPERTY_ORDER
           
static int PROPERTY_REMOVEABLE
           
static int PROPERTY_SITE_HOST
           
static int SERVICE_ABOUT
           
static int SERVICE_ADD_FRIEND
           
static int SERVICE_AUTH_RPC
           
static int SERVICE_AUTHORIZE
           
static int SERVICE_BIG_BROWSE
           
static int SERVICE_BLOG
           
static int SERVICE_COMMENT
           
static int SERVICE_CONTENT_DETAILS
           
static int SERVICE_EXT_SITE_RELATIVE
           
static int SERVICE_FAQ
           
static int SERVICE_FAQ_TOPIC
           
static int SERVICE_FORUMS
           
static int SERVICE_GET_ICON
           
static int SERVICE_IDENTIFY
           
static int SERVICE_LOGIN
           
static int SERVICE_LOGOUT
           
static int SERVICE_MY_ACCOUNT
           
static int SERVICE_MY_PROFILE
           
static int SERVICE_POSTPLAYBACK
           
static int SERVICE_PREPLAYBACK
           
static int SERVICE_PROFILE
           
static int SERVICE_PUBLISH
           
static int SERVICE_PUBLISH_ABOUT
           
static int SERVICE_PUBLISH_NEW
           
static int SERVICE_REGISTER
           
static int SERVICE_RELAY_RPC
           
static int SERVICE_RPC
           
static int SERVICE_SIDEBAR_CLOSE
           
static int SERVICE_SITE
           
static int SERVICE_SITE_RELATIVE
           
static int SERVICE_SUBSCRIPTION
           
static int SERVICE_SUPPORT
           
static int SERVICE_TORRENT_DOWNLOAD
           
static int SERVICE_WELCOME
           
static int SERVICE_WIKI
           
static int SERVICE_XSEARCH
           
 
Method Summary
 void addPersistentPropertyChangeListener(ContentNetworkPropertyChangeListener listener)
           
 java.lang.String appendURLSuffix(java.lang.String url_in, boolean for_post, boolean include_azid)
          I'd rather this function we embedded into the ContentNetwork service getting logic, but for the moment expose it for simplicity
 java.lang.String getAddFriendURL(java.lang.String bg_colour)
           
 java.lang.String getCommentService(java.lang.String hash)
           
 java.lang.String getContentDetailsService(java.lang.String hash, java.lang.String client_ref)
           
 java.lang.String getExternalSiteRelativeURL(java.lang.String relative_url, boolean append_suffix)
           
 java.lang.String getFAQTopicService(java.lang.String topic)
           
 long getID()
          Returns one of the above CONTENT_NETWORK constants
 java.lang.String getLoginService(java.lang.String message)
           
 java.lang.String getName()
           
 java.lang.Object getPersistentProperty(java.lang.String name)
           
 java.lang.String getProfileService(java.lang.String login_id, java.lang.String client_ref)
           
 java.lang.Object getProperty(int property)
           
 java.lang.String getServiceURL(int service_type)
          Returns the base URL of the service.
 java.lang.String getServiceURL(int service_type, java.lang.Object[] params)
          Generic parameterised service method
 java.lang.String getSiteRelativeURL(java.lang.String relative_url, boolean append_suffix)
           
 java.lang.String getSubscriptionURL(java.lang.String subs_id)
           
 java.lang.String getTorrentDownloadService(java.lang.String hash, java.lang.String client_ref)
           
 java.lang.Object getTransientProperty(java.lang.Object key)
           
 VuzeFile getVuzeFile()
          export to vuze file
 java.lang.String getXSearchService(java.lang.String query, boolean to_subscribe)
           
 boolean isServiceSupported(int service_type)
          Test if the network supports a particular service
 boolean isStartupNetwork()
           
 void remove()
           
 void removePersistentPropertyChangeListener(ContentNetworkPropertyChangeListener listener)
           
 void setPersistentProperty(java.lang.String name, java.lang.Object value)
          Sets a locally persistent property.
 void setStartupNetwork(boolean is_startup)
           
 void setTransientProperty(java.lang.Object key, java.lang.Object value)
          Set a non-persistent property of the content network
 

Field Detail

CONTENT_NETWORK_UNKNOWN

static final long CONTENT_NETWORK_UNKNOWN
See Also:
Constant Field Values

CONTENT_NETWORK_VUZE

static final long CONTENT_NETWORK_VUZE
See Also:
Constant Field Values

CONTENT_NETWORK_RFN

static final long CONTENT_NETWORK_RFN
You should normally NOT refer explicitly to this constant without consideration as we don't want network-specific code proliferating

See Also:
Constant Field Values

CONTENT_NETWORK_VHDNL

static final long CONTENT_NETWORK_VHDNL
See Also:
Constant Field Values

SERVICE_XSEARCH

static final int SERVICE_XSEARCH
See Also:
Constant Field Values

SERVICE_RPC

static final int SERVICE_RPC
See Also:
Constant Field Values

SERVICE_RELAY_RPC

static final int SERVICE_RELAY_RPC
See Also:
Constant Field Values

SERVICE_AUTH_RPC

static final int SERVICE_AUTH_RPC
See Also:
Constant Field Values

SERVICE_BIG_BROWSE

static final int SERVICE_BIG_BROWSE
See Also:
Constant Field Values

SERVICE_PUBLISH

static final int SERVICE_PUBLISH
See Also:
Constant Field Values

SERVICE_WELCOME

static final int SERVICE_WELCOME
See Also:
Constant Field Values

SERVICE_PUBLISH_NEW

static final int SERVICE_PUBLISH_NEW
See Also:
Constant Field Values

SERVICE_PUBLISH_ABOUT

static final int SERVICE_PUBLISH_ABOUT
See Also:
Constant Field Values

SERVICE_CONTENT_DETAILS

static final int SERVICE_CONTENT_DETAILS
See Also:
Constant Field Values

SERVICE_COMMENT

static final int SERVICE_COMMENT
See Also:
Constant Field Values

SERVICE_PROFILE

static final int SERVICE_PROFILE
See Also:
Constant Field Values

SERVICE_TORRENT_DOWNLOAD

static final int SERVICE_TORRENT_DOWNLOAD
See Also:
Constant Field Values

SERVICE_SITE

static final int SERVICE_SITE
See Also:
Constant Field Values

SERVICE_SUPPORT

static final int SERVICE_SUPPORT
See Also:
Constant Field Values

SERVICE_FAQ

static final int SERVICE_FAQ
See Also:
Constant Field Values

SERVICE_FAQ_TOPIC

static final int SERVICE_FAQ_TOPIC
See Also:
Constant Field Values

SERVICE_BLOG

static final int SERVICE_BLOG
See Also:
Constant Field Values

SERVICE_FORUMS

static final int SERVICE_FORUMS
See Also:
Constant Field Values

SERVICE_WIKI

static final int SERVICE_WIKI
See Also:
Constant Field Values

SERVICE_LOGIN

static final int SERVICE_LOGIN
See Also:
Constant Field Values

SERVICE_LOGOUT

static final int SERVICE_LOGOUT
See Also:
Constant Field Values

SERVICE_REGISTER

static final int SERVICE_REGISTER
See Also:
Constant Field Values

SERVICE_MY_PROFILE

static final int SERVICE_MY_PROFILE
See Also:
Constant Field Values

SERVICE_MY_ACCOUNT

static final int SERVICE_MY_ACCOUNT
See Also:
Constant Field Values

SERVICE_SITE_RELATIVE

static final int SERVICE_SITE_RELATIVE
See Also:
Constant Field Values

SERVICE_ADD_FRIEND

static final int SERVICE_ADD_FRIEND
See Also:
Constant Field Values

SERVICE_SUBSCRIPTION

static final int SERVICE_SUBSCRIPTION
See Also:
Constant Field Values

SERVICE_GET_ICON

static final int SERVICE_GET_ICON
See Also:
Constant Field Values

SERVICE_AUTHORIZE

static final int SERVICE_AUTHORIZE
See Also:
Constant Field Values

SERVICE_PREPLAYBACK

static final int SERVICE_PREPLAYBACK
See Also:
Constant Field Values

SERVICE_POSTPLAYBACK

static final int SERVICE_POSTPLAYBACK
See Also:
Constant Field Values

SERVICE_SIDEBAR_CLOSE

static final int SERVICE_SIDEBAR_CLOSE
See Also:
Constant Field Values

SERVICE_ABOUT

static final int SERVICE_ABOUT
See Also:
Constant Field Values

SERVICE_IDENTIFY

static final int SERVICE_IDENTIFY
See Also:
Constant Field Values

SERVICE_EXT_SITE_RELATIVE

static final int SERVICE_EXT_SITE_RELATIVE
See Also:
Constant Field Values

PROPERTY_SITE_HOST

static final int PROPERTY_SITE_HOST
See Also:
Constant Field Values

PROPERTY_REMOVEABLE

static final int PROPERTY_REMOVEABLE
See Also:
Constant Field Values

PROPERTY_ORDER

static final int PROPERTY_ORDER
See Also:
Constant Field Values

PP_AUTH_PAGE_SHOWN

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

PP_IS_CUSTOMIZATION

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

PP_ACTIVE

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

PP_SHOW_IN_MENU

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

PP_SOURCE_REF

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

getID

long getID()
Returns one of the above CONTENT_NETWORK constants

Returns:

getName

java.lang.String getName()

getProperty

java.lang.Object getProperty(int property)

isStartupNetwork

boolean isStartupNetwork()

setStartupNetwork

void setStartupNetwork(boolean is_startup)

isServiceSupported

boolean isServiceSupported(int service_type)
Test if the network supports a particular service

Parameters:
service_type -
Returns:

getServiceURL

java.lang.String getServiceURL(int service_type)
Returns the base URL of the service. If not parameterised then this is sufficient to invoke the service

Parameters:
service_type -
Returns:

getServiceURL

java.lang.String getServiceURL(int service_type,
                               java.lang.Object[] params)
Generic parameterised service method

Parameters:
service_type -
params -
Returns:

getXSearchService

java.lang.String getXSearchService(java.lang.String query,
                                   boolean to_subscribe)

getContentDetailsService

java.lang.String getContentDetailsService(java.lang.String hash,
                                          java.lang.String client_ref)

getCommentService

java.lang.String getCommentService(java.lang.String hash)

getProfileService

java.lang.String getProfileService(java.lang.String login_id,
                                   java.lang.String client_ref)

getTorrentDownloadService

java.lang.String getTorrentDownloadService(java.lang.String hash,
                                           java.lang.String client_ref)

getFAQTopicService

java.lang.String getFAQTopicService(java.lang.String topic)
Parameters:
topic - The topic number or a pre-defined topic constant found in FAQTopics

getLoginService

java.lang.String getLoginService(java.lang.String message)

getSiteRelativeURL

java.lang.String getSiteRelativeURL(java.lang.String relative_url,
                                    boolean append_suffix)

getExternalSiteRelativeURL

java.lang.String getExternalSiteRelativeURL(java.lang.String relative_url,
                                            boolean append_suffix)

getAddFriendURL

java.lang.String getAddFriendURL(java.lang.String bg_colour)

getSubscriptionURL

java.lang.String getSubscriptionURL(java.lang.String subs_id)

appendURLSuffix

java.lang.String appendURLSuffix(java.lang.String url_in,
                                 boolean for_post,
                                 boolean include_azid)
I'd rather this function we embedded into the ContentNetwork service getting logic, but for the moment expose it for simplicity

Parameters:
url_in - base URL onto which the suffix should be appended
for_post - whether this is for an HTTP 'POST' operation, in which case the parameter separator is always an '&' (for 'GET' the first param uses a '?' sep)
include_azid - whether or not we should include the azid in the suffix
Returns:

getVuzeFile

VuzeFile getVuzeFile()
export to vuze file

Returns:

setPersistentProperty

void setPersistentProperty(java.lang.String name,
                           java.lang.Object value)
Sets a locally persistent property. Name should be from the PP_ names above so keep track of what attributes exist

Parameters:
name - PP_ constant
value - must be bencodable!

getPersistentProperty

java.lang.Object getPersistentProperty(java.lang.String name)

addPersistentPropertyChangeListener

void addPersistentPropertyChangeListener(ContentNetworkPropertyChangeListener listener)

removePersistentPropertyChangeListener

void removePersistentPropertyChangeListener(ContentNetworkPropertyChangeListener listener)

setTransientProperty

void setTransientProperty(java.lang.Object key,
                          java.lang.Object value)
Set a non-persistent property of the content network

Parameters:
key -
value -

getTransientProperty

java.lang.Object getTransientProperty(java.lang.Object key)

remove

void remove()