foobar2000 SDK  2015-01-14
Public Member Functions | Private Member Functions
input_entry_impl_t< I, t_flags, t_decoder, t_inforeader, t_infowriter >

#include <input_impl.h>

+ Inheritance diagram for input_entry_impl_t< I, t_flags, t_decoder, t_inforeader, t_infowriter >:

Public Member Functions

void get_extended_data (service_ptr_t< file > p_filehint, const playable_location &p_location, const GUID &p_guid, mem_block_container &p_out, abort_callback &p_abort)
 
unsigned get_flags ()
 
bool is_our_content_type (const char *p_type)
 
bool is_our_path (const char *p_full_path, const char *p_extension)
 
void open_for_decoding (service_ptr_t< input_decoder > &p_instance, service_ptr_t< file > p_filehint, const char *p_path, abort_callback &p_abort)
 
void open_for_info_read (service_ptr_t< input_info_reader > &p_instance, service_ptr_t< file > p_filehint, const char *p_path, abort_callback &p_abort)
 
void open_for_info_write (service_ptr_t< input_info_writer > &p_instance, service_ptr_t< file > p_filehint, const char *p_path, abort_callback &p_abort)
 
- Public Member Functions inherited from input_entry
bool are_parallel_reads_slow ()
 
 FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT (input_entry)
 
bool is_redirect ()
 
void open (service_ptr_t< input_decoder > &p_instance, service_ptr_t< file > const &p_filehint, const char *p_path, abort_callback &p_abort)
 
void open (service_ptr_t< input_info_reader > &p_instance, service_ptr_t< file > const &p_filehint, const char *p_path, abort_callback &p_abort)
 
void open (service_ptr_t< input_info_writer > &p_instance, service_ptr_t< file > const &p_filehint, const char *p_path, abort_callback &p_abort)
 
- Public Member Functions inherited from service_base
template<typename outPtr_t >
bool cast (outPtr_t &outPtr)
 
virtual int service_add_ref ()=0 throw ()
 
virtual bool service_query (service_ptr_t< service_base > &p_out, const GUID &p_guid)
 
template<class T >
bool service_query_t (service_ptr_t< T > &p_out)
 
virtual int service_release ()=0 throw ()
 

Private Member Functions

template<typename T , typename out >
void instantiate_t (service_ptr_t< out > &p_instance, service_ptr_t< file > p_filehint, const char *p_path, t_input_open_reason p_reason, abort_callback &p_abort)
 

Additional Inherited Members

- Public Types inherited from input_entry
enum  { flag_redirect = 1, flag_parallel_reads_slow = 2 }
 
- Public Types inherited from service_base
typedef service_base t_interface
 
- Static Public Member Functions inherited from input_entry
static bool g_find_service_by_content_type (service_ptr_t< input_entry > &p_out, const char *p_content_type)
 
static bool g_find_service_by_path (service_ptr_t< input_entry > &p_out, const char *p_path)
 
static bool g_find_service_by_path (service_ptr_t< input_entry > &p_out, const char *p_path, const char *p_ext)
 
static bool g_is_supported_path (const char *p_path)
 
static void g_open_for_decoding (service_ptr_t< input_decoder > &p_instance, service_ptr_t< file > p_filehint, const char *p_path, abort_callback &p_abort, bool p_from_redirect=false)
 
static void g_open_for_info_read (service_ptr_t< input_info_reader > &p_instance, service_ptr_t< file > p_filehint, const char *p_path, abort_callback &p_abort, bool p_from_redirect=false)
 
static void g_open_for_info_write (service_ptr_t< input_info_writer > &p_instance, service_ptr_t< file > p_filehint, const char *p_path, abort_callback &p_abort, bool p_from_redirect=false)
 
static void g_open_for_info_write_timeout (service_ptr_t< input_info_writer > &p_instance, service_ptr_t< file > p_filehint, const char *p_path, abort_callback &p_abort, double p_timeout, bool p_from_redirect=false)
 
- Protected Member Functions inherited from service_base
 service_base ()
 
 ~service_base ()
 

Detailed Description

template<typename I, unsigned t_flags, typename t_decoder = input_decoder, typename t_inforeader = input_info_reader, typename t_infowriter = input_info_writer>
class input_entry_impl_t< I, t_flags, t_decoder, t_inforeader, t_infowriter >

Helper; standard input_entry implementation. Do not instantiate this directly, use input_factory_t or one of other input_*_factory_t helpers instead.

Definition at line 292 of file input_impl.h.

Member Function Documentation

template<typename I, unsigned t_flags, typename t_decoder = input_decoder, typename t_inforeader = input_info_reader, typename t_infowriter = input_info_writer>
void input_entry_impl_t< I, t_flags, t_decoder, t_inforeader, t_infowriter >::get_extended_data ( service_ptr_t< file p_filehint,
const playable_location p_location,
const GUID p_guid,
mem_block_container p_out,
abort_callback p_abort 
)
inlinevirtual

Reserved for future use. Do nothing and return until specifications are finalized.

Implements input_entry.

Definition at line 320 of file input_impl.h.

320  {
321  p_out.reset();
322  }
template<typename I, unsigned t_flags, typename t_decoder = input_decoder, typename t_inforeader = input_info_reader, typename t_infowriter = input_info_writer>
unsigned input_entry_impl_t< I, t_flags, t_decoder, t_inforeader, t_infowriter >::get_flags ( )
inlinevirtual

See flag_* enums.

Implements input_entry.

Definition at line 324 of file input_impl.h.

324 {return t_flags;}
template<typename I, unsigned t_flags, typename t_decoder = input_decoder, typename t_inforeader = input_info_reader, typename t_infowriter = input_info_writer>
template<typename T , typename out >
void input_entry_impl_t< I, t_flags, t_decoder, t_inforeader, t_infowriter >::instantiate_t ( service_ptr_t< out > &  p_instance,
service_ptr_t< file p_filehint,
const char *  p_path,
t_input_open_reason  p_reason,
abort_callback p_abort 
)
inlineprivate

Definition at line 297 of file input_impl.h.

298  {
301  temp->open(p_filehint,p_path,p_reason,p_abort);
302  p_instance = temp.get_ptr();
303  }
Template implementing reference-counting features of service_base. Intended for dynamic instantiation...
Definition: service_impl.h:4
T * get_ptr() const
Definition: service.h:117
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
Definition: service.h:55
template<typename I, unsigned t_flags, typename t_decoder = input_decoder, typename t_inforeader = input_info_reader, typename t_infowriter = input_info_writer>
bool input_entry_impl_t< I, t_flags, t_decoder, t_inforeader, t_infowriter >::is_our_content_type ( const char *  p_type)
inlinevirtual

Determines whether specified content type can be handled by this input.

Parameters
p_typeContent type string to test.

Implements input_entry.

Definition at line 305 of file input_impl.h.

305 {return I::g_is_our_content_type(p_type);}
template<typename I, unsigned t_flags, typename t_decoder = input_decoder, typename t_inforeader = input_info_reader, typename t_infowriter = input_info_writer>
bool input_entry_impl_t< I, t_flags, t_decoder, t_inforeader, t_infowriter >::is_our_path ( const char *  p_full_path,
const char *  p_extension 
)
inlinevirtual

Determines whether specified file type can be handled by this input. This must not use any kind of file access; the result should be only based on file path / extension.

Parameters
p_full_pathFull URL of file being tested.
p_extensionExtension of file being tested, provided by caller for performance reasons.

Implements input_entry.

Definition at line 306 of file input_impl.h.

306 {return I::g_is_our_path(p_full_path,p_extension);}
template<typename I, unsigned t_flags, typename t_decoder = input_decoder, typename t_inforeader = input_info_reader, typename t_infowriter = input_info_writer>
void input_entry_impl_t< I, t_flags, t_decoder, t_inforeader, t_infowriter >::open_for_decoding ( service_ptr_t< input_decoder > &  p_instance,
service_ptr_t< file p_filehint,
const char *  p_path,
abort_callback p_abort 
)
inlinevirtual

Opens specified resource for decoding.

Parameters
p_instanceReceives new input_decoder instance if successful.
p_filehintOptional; passes file object to use for the operation; if set to null, the service will handle opening file by itself. Note that not all inputs operate on physical files that can be reached through filesystem API, some of them require this parameter to be set to null (tone and silence generators for an example).
p_pathURL of resource being opened.
p_abortabort_callback object signaling user aborting the operation.

Implements input_entry.

Definition at line 308 of file input_impl.h.

308  {
309  instantiate_t<t_decoder>(p_instance,p_filehint,p_path,input_open_decode,p_abort);
310  }
template<typename I, unsigned t_flags, typename t_decoder = input_decoder, typename t_inforeader = input_info_reader, typename t_infowriter = input_info_writer>
void input_entry_impl_t< I, t_flags, t_decoder, t_inforeader, t_infowriter >::open_for_info_read ( service_ptr_t< input_info_reader > &  p_instance,
service_ptr_t< file p_filehint,
const char *  p_path,
abort_callback p_abort 
)
inlinevirtual

Opens specified file for reading info.

Parameters
p_instanceReceives new input_info_reader instance if successful.
p_filehintOptional; passes file object to use for the operation; if set to null, the service will handle opening file by itself. Note that not all inputs operate on physical files that can be reached through filesystem API, some of them require this parameter to be set to null (tone and silence generators for an example).
p_pathURL of resource being opened.
p_abortabort_callback object signaling user aborting the operation.

Implements input_entry.

Definition at line 312 of file input_impl.h.

312  {
313  instantiate_t<t_inforeader>(p_instance,p_filehint,p_path,input_open_info_read,p_abort);
314  }
template<typename I, unsigned t_flags, typename t_decoder = input_decoder, typename t_inforeader = input_info_reader, typename t_infowriter = input_info_writer>
void input_entry_impl_t< I, t_flags, t_decoder, t_inforeader, t_infowriter >::open_for_info_write ( service_ptr_t< input_info_writer > &  p_instance,
service_ptr_t< file p_filehint,
const char *  p_path,
abort_callback p_abort 
)
inlinevirtual

Opens specified file for writing info.

Parameters
p_instanceReceives new input_info_writer instance if successful.
p_filehintOptional; passes file object to use for the operation; if set to null, the service will handle opening file by itself. Note that not all inputs operate on physical files that can be reached through filesystem API, some of them require this parameter to be set to null (tone and silence generators for an example).
p_pathURL of resource being opened.
p_abortabort_callback object signaling user aborting the operation.

Implements input_entry.

Definition at line 316 of file input_impl.h.

316  {
317  instantiate_t<t_infowriter>(p_instance,p_filehint,p_path,input_open_info_write,p_abort);
318  }

The documentation for this class was generated from the following file: