foobar2000 SDK  2015-01-14
Public Member Functions | Static Public Member Functions
hasher_md5abstract

#include <hasher_md5.h>

+ Inheritance diagram for hasher_md5:

Public Member Functions

 FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT (hasher_md5)
 
virtual hasher_md5_result get_result (const hasher_md5_state &p_state)=0
 
GUID get_result_guid (const hasher_md5_state &p_state)
 
virtual void initialize (hasher_md5_state &p_state)=0
 
virtual void process (hasher_md5_state &p_state, const void *p_buffer, t_size p_bytes)=0
 
hasher_md5_result process_single (const void *p_buffer, t_size p_bytes)
 
GUID process_single_guid (const void *p_buffer, t_size p_bytes)
 
hasher_md5_result process_single_string (const char *str)
 
void process_string (hasher_md5_state &p_state, const char *p_string, t_size p_length=~0)
 
- 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 ()
 

Static Public Member Functions

static GUID guid_from_result (const hasher_md5_result &param)
 

Additional Inherited Members

- Public Types inherited from service_base
typedef service_base t_interface
 
- Protected Member Functions inherited from service_base
 service_base ()
 
 ~service_base ()
 

Detailed Description

Definition at line 26 of file hasher_md5.h.

Member Function Documentation

hasher_md5::FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT ( hasher_md5  )
virtual hasher_md5_result hasher_md5::get_result ( const hasher_md5_state p_state)
pure virtual
GUID hasher_md5::get_result_guid ( const hasher_md5_state p_state)
inline

Definition at line 40 of file hasher_md5.h.

40 {return guid_from_result(get_result(p_state));}
virtual hasher_md5_result get_result(const hasher_md5_state &p_state)=0
static GUID guid_from_result(const hasher_md5_result &param)
Definition: hasher_md5.cpp:3
GUID hasher_md5::guid_from_result ( const hasher_md5_result param)
static

Definition at line 3 of file hasher_md5.cpp.

4 {
5  assert(sizeof(GUID) == sizeof(hasher_md5_result));
6  GUID temp = * reinterpret_cast<const GUID*>(&param);
8  return temp;
9 }
Definition: pfc.h:53
void order_le_to_native_t(T &param)
virtual void hasher_md5::initialize ( hasher_md5_state p_state)
pure virtual
virtual void hasher_md5::process ( hasher_md5_state p_state,
const void *  p_buffer,
t_size  p_bytes 
)
pure virtual
hasher_md5_result hasher_md5::process_single ( const void *  p_buffer,
t_size  p_bytes 
)

Definition at line 11 of file hasher_md5.cpp.

12 {
13  hasher_md5_state state;
14  initialize(state);
15  process(state,p_buffer,p_bytes);
16  return get_result(state);
17 }
virtual hasher_md5_result get_result(const hasher_md5_state &p_state)=0
virtual void initialize(hasher_md5_state &p_state)=0
virtual void process(hasher_md5_state &p_state, const void *p_buffer, t_size p_bytes)=0
GUID hasher_md5::process_single_guid ( const void *  p_buffer,
t_size  p_bytes 
)

Definition at line 19 of file hasher_md5.cpp.

20 {
21  return guid_from_result(process_single(p_buffer,p_bytes));
22 }
hasher_md5_result process_single(const void *p_buffer, t_size p_bytes)
Definition: hasher_md5.cpp:11
static GUID guid_from_result(const hasher_md5_result &param)
Definition: hasher_md5.cpp:3
hasher_md5_result hasher_md5::process_single_string ( const char *  str)
inline

Definition at line 38 of file hasher_md5.h.

38 {return process_single(str, strlen(str));}
hasher_md5_result process_single(const void *p_buffer, t_size p_bytes)
Definition: hasher_md5.cpp:11
void hasher_md5::process_string ( hasher_md5_state p_state,
const char *  p_string,
t_size  p_length = ~0 
)
inline

Helper.

Definition at line 44 of file hasher_md5.h.

44 {return process(p_state,p_string,pfc::strlen_max(p_string,p_length));}
t_size strlen_max(const char *ptr, t_size max)
Definition: string_base.h:91
virtual void process(hasher_md5_state &p_state, const void *p_buffer, t_size p_bytes)=0

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