InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IHTTPLinkResourceServerAPIWrapper Class Referenceabstract

#include <IHTTPLinkResourceServerAPIWrapper.h>

Inheritance diagram for IHTTPLinkResourceServerAPIWrapper:
IPMUnknownCPMUnknown< IHTTPLinkResourceServerAPIWrapper >CusHttpLnkResourceServerAPIWrapper

Classes

struct  AssetMetadata
 
struct  AssetStatusWithMetadata
 

Public Types

enum  { kDefaultIID = IID_IHTTPLINKRESOURCESERVERAPIWRAPPER }
 
typedef boost::shared_ptr
< AssetStatusWithMetadata
AssetStatusWithMetadataPtr
 
typedef boost::shared_ptr
< AssetMetadata
AssetMetadataPtr
 
typedef std::vector
< AssetStatusWithMetadataPtr > 
AssetStatusWithMetadataPtrVector
 
typedef std::vector< URIURIVector
 
typedef boost::shared_ptr
< std::string > 
AssetMetadataContentPtr
 
typedef boost::shared_ptr
< AssetStatusWithMetadataPtrVector > 
AssetStatusWithMetadataPtrVectorPtr
 
typedef std::map< std::string,
AssetStatusWithMetadataPtr > 
AssetPathToMetadataMap
 
typedef
AssetPathToMetadataMap::iterator 
AssetPathToMetadataMap_iter
 
typedef std::vector< WideStringAssetPathVector
 
typedef boost::function< void(AssetStatusWithMetadataPtr
assetStatusWithMetadataPtr)> 
RequestAssetStatusCompletionFunction
 
typedef boost::function< void(AssetStatusWithMetadataPtrVectorPtr
assetStatusWithMetadataPtrVectorPtr)> 
RequestBatchAssetStatusCompletionFunction
 

Public Member Functions

virtual AssetStatusWithMetadataPtr RequestAssetStatusWithMetadata (IHTTPLinkResourceConnection *connection, const URI &assetURI)=0
 
virtual bool16 AsyncRequestAssetStatusWithMetadata (IHTTPLinkResourceConnection *connection, const URI &assetURI, RequestAssetStatusCompletionFunction completionFunction)=0
 
virtual bool16 AsyncRequestBatchAssetStatusWithMetadata (IHTTPLinkResourceConnection *connection, const URIVector &assetURIVector, RequestBatchAssetStatusCompletionFunction completionFunction)=0
 
virtual bool16 GenerateSessionToken (IHTTPLinkResourceConnection *connection, std::string &token)=0
 
virtual bool16 GetConfiguredBatchLimits (IHTTPLinkResourceConnection *connection, int32 &batchLimit, long &maxTimeinMs, long &minTimeinMs)=0
 
virtual bool16 IsServerAccessible (IHTTPLinkResourceConnection *connection, bool16 &serverAccessible)=0
 
virtual bool16 FetchAssetPathAndRequestHeadersForDownload (IHTTPLinkResourceConnection *connection, const URI &inURI, URI &assetURI, HTTPLinkSubsystemTypes::Headers &headers) const =0
 
virtual URI GetAssetURI (const URI &inAssetURI, ILinkResourceRenditionData::ResourceRenditionType type=ILinkResourceRenditionData::kOriginal) const =0
 
virtual bool16 IsBatchUpdateSupported (const URI &uri) const =0
 
virtual
ILinkResourceRenditionData::ResourceRenditionType 
GetURIRenditionType (const URI &inURI) const =0
 
virtual AssetMetadataContentPtr RequestAssetTextFragmentContent (IHTTPLinkResourceConnection *connection, const URI &inURI, ErrorCode err=kCantPlaceTextFragmentLinkError)=0
 
virtual bool16 GetHTTPBatchRequestObjectType (const URI &uri, HTTPLinkSubsystemTypes::BatchRequestObjectType &objType) const =0
 
virtual bool16 AdjustURI (const URI &inUri, URI &outUri)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

IHTTPLinkResourceServerAPIWrapper deals with high level server API/functionalities . Some of its reposibilities include fetching metadata, checking server connection , generation of session token etc. Look through functions for details functionalities. If custom state batch updater is used then return true from IsBatchUpdateSupported(refer IHTTPLinkResourceStateBatchUpdater.h for more details).

To subclass create a boss based on kHTTPAssetLinkResourceServerHelperBoss with the implementation of this interface. And return this connection instance from the IHTTPLinkSubsystemObjectFactory. It is mandatory to implement this interface for creating new plugin to handle particular scheme.

Member Function Documentation

virtual bool16 IHTTPLinkResourceServerAPIWrapper::AsyncRequestAssetStatusWithMetadata (IHTTPLinkResourceConnectionconnection,
const URIassetURI,
RequestAssetStatusCompletionFunction completionFunction 
)
pure virtual

Async mode request for the status of metadata asset for given asset URI.

Parameters
connection[IN] HTTP Link Resource connection
assetURI[IN] asset URI for status check
completionFunction[IN] Asset Status Completion function
Returns
kTrue on success else kFalse.

Implemented in CusHttpLnkResourceServerAPIWrapper.

virtual bool16 IHTTPLinkResourceServerAPIWrapper::AsyncRequestBatchAssetStatusWithMetadata (IHTTPLinkResourceConnectionconnection,
const URIVector & assetURIVector,
RequestBatchAssetStatusCompletionFunction completionFunction 
)
pure virtual

Async mode for batch request for the status of metadata for passed vector of asset URIs.

Parameters
connection[IN] HTTP Link Resource connection
assetURIVector[IN] vector of asset URIs for batch status check
completionFunction[IN] Asset Status Completion Function
Returns
kTrue on success else kFalse.

Implemented in CusHttpLnkResourceServerAPIWrapper.

virtual ILinkResourceRenditionData::ResourceRenditionType IHTTPLinkResourceServerAPIWrapper::GetURIRenditionType (const URIinURI) const
pure virtual

Returns the rendition type of passed URI

Returns
the rendition type (kFPO or kOriginal)

Implemented in CusHttpLnkResourceServerAPIWrapper.

virtual AssetStatusWithMetadataPtr IHTTPLinkResourceServerAPIWrapper::RequestAssetStatusWithMetadata (IHTTPLinkResourceConnectionconnection,
const URIassetURI 
)
pure virtual

Request the status of the Metadata asset specified by the assetURI on copnnection. e.g missing, modified etc

Parameters
connection[IN] HTTP Link Resource connection
assetURIVector[IN] vector of asset URIs status check
Returns
status of the metadata of the asset

Implemented in CusHttpLnkResourceServerAPIWrapper.

virtual AssetMetadataContentPtr IHTTPLinkResourceServerAPIWrapper::RequestAssetTextFragmentContent (IHTTPLinkResourceConnectionconnection,
const URIinURI,
ErrorCode err = kCantPlaceTextFragmentLinkError 
)
pure virtual

Experimental; For internal use only.

Fetches the metadata content for the metadata asset specified by the given input URI.

Parameters
connection[IN] HTTP Link Resource connection
inURI[IN] input URI for text fragment content
err[IN] errorCode
Returns
pointer(handle) to Asset Metadata Content(Asset Text Fragment Link content)

Implemented in CusHttpLnkResourceServerAPIWrapper.