Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
KODI::PLAYLIST::CSmartPlaylistRule Class Reference

#include <SmartPlayList.h>

Inheritance diagram for KODI::PLAYLIST::CSmartPlaylistRule:
CDatabaseQueryRule

Public Member Functions

 CSmartPlaylistRule ()
 
 ~CSmartPlaylistRule () override=default
 
std::string GetLocalizedRule () const
 
FIELD_TYPE GetFieldType (int field) const override
 
- Public Member Functions inherited from CDatabaseQueryRule
 CDatabaseQueryRule ()
 
virtual ~CDatabaseQueryRule ()=default
 
virtual bool Load (const TiXmlNode *node, const std::string &encoding="UTF-8")
 
virtual bool Load (const CVariant &obj)
 
virtual bool Save (TiXmlNode *parent) const
 
virtual bool Save (CVariant &obj) const
 
std::string GetParameter () const
 
void SetParameter (const std::string &value)
 
void SetParameter (const std::vector< std::string > &values)
 
virtual std::string GetWhereClause (const CDatabase &db, const std::string &strType) const
 

Static Public Member Functions

static SortBy TranslateOrder (const char *order)
 
static std::string TranslateOrder (SortBy order)
 
static Field TranslateGroup (const char *group)
 
static std::string TranslateGroup (Field group)
 
static std::string GetLocalizedField (int field)
 
static std::string GetLocalizedGroup (Field group)
 
static bool CanGroupMix (Field group)
 
static std::vector< FieldGetFields (const std::string &type)
 
static std::vector< SortByGetOrders (const std::string &type)
 
static std::vector< FieldGetGroups (const std::string &type)
 
static bool IsFieldBrowseable (int field)
 
static bool Validate (const std::string &input, void *data)
 
static bool ValidateRating (const std::string &input, void *data)
 
static bool ValidateMyRating (const std::string &input, void *data)
 
- Static Public Member Functions inherited from CDatabaseQueryRule
static std::string GetLocalizedOperator (SEARCH_OPERATOR oper)
 
static void GetAvailableOperators (std::vector< std::string > &operatorList)
 

Protected Member Functions

std::string GetField (int field, const std::string &type) const override
 
int TranslateField (const char *field) const override
 
std::string TranslateField (int field) const override
 
std::string FormatParameter (const std::string &negate, const std::string &oper, const CDatabase &db, const std::string &type) const override
 
std::string FormatWhereClause (const std::string &negate, const std::string &oper, const std::string &param, const CDatabase &db, const std::string &type) const override
 
SEARCH_OPERATOR GetOperator (const std::string &type) const override
 
std::string GetBooleanQuery (const std::string &negate, const std::string &strType) const override
 
- Protected Member Functions inherited from CDatabaseQueryRule
std::string ValidateParameter (const std::string &parameter) const
 
virtual std::string GetOperatorString (SEARCH_OPERATOR op) const
 

Additional Inherited Members

- Public Types inherited from CDatabaseQueryRule
enum  SEARCH_OPERATOR {
  OPERATOR_START = 0 , OPERATOR_CONTAINS , OPERATOR_DOES_NOT_CONTAIN , OPERATOR_EQUALS ,
  OPERATOR_DOES_NOT_EQUAL , OPERATOR_STARTS_WITH , OPERATOR_ENDS_WITH , OPERATOR_GREATER_THAN ,
  OPERATOR_LESS_THAN , OPERATOR_AFTER , OPERATOR_BEFORE , OPERATOR_IN_THE_LAST ,
  OPERATOR_NOT_IN_THE_LAST , OPERATOR_TRUE , OPERATOR_FALSE , OPERATOR_BETWEEN ,
  OPERATOR_END
}
 
enum  FIELD_TYPE {
  TEXT_FIELD = 0 , REAL_FIELD , NUMERIC_FIELD , DATE_FIELD ,
  PLAYLIST_FIELD , SECONDS_FIELD , BOOLEAN_FIELD , TEXTIN_FIELD
}
 
- Public Attributes inherited from CDatabaseQueryRule
int m_field
 
SEARCH_OPERATOR m_operator
 
std::vector< std::string > m_parameter
 
- Static Protected Member Functions inherited from CDatabaseQueryRule
static SEARCH_OPERATOR TranslateOperator (const char *oper)
 
static std::string TranslateOperator (SEARCH_OPERATOR oper)
 

Constructor & Destructor Documentation

◆ CSmartPlaylistRule()

KODI::PLAYLIST::CSmartPlaylistRule::CSmartPlaylistRule ( )
default

◆ ~CSmartPlaylistRule()

KODI::PLAYLIST::CSmartPlaylistRule::~CSmartPlaylistRule ( )
overridedefault

Member Function Documentation

◆ CanGroupMix()

bool KODI::PLAYLIST::CSmartPlaylistRule::CanGroupMix ( Field group)
static

◆ FormatParameter()

std::string KODI::PLAYLIST::CSmartPlaylistRule::FormatParameter ( const std::string & negate,
const std::string & oper,
const CDatabase & db,
const std::string & type ) const
overrideprotectedvirtual

Reimplemented from CDatabaseQueryRule.

◆ FormatWhereClause()

std::string KODI::PLAYLIST::CSmartPlaylistRule::FormatWhereClause ( const std::string & negate,
const std::string & oper,
const std::string & param,
const CDatabase & db,
const std::string & type ) const
overrideprotectedvirtual

Reimplemented from CDatabaseQueryRule.

◆ GetBooleanQuery()

std::string KODI::PLAYLIST::CSmartPlaylistRule::GetBooleanQuery ( const std::string & negate,
const std::string & strType ) const
overrideprotectedvirtual

Reimplemented from CDatabaseQueryRule.

◆ GetField()

std::string KODI::PLAYLIST::CSmartPlaylistRule::GetField ( int field,
const std::string & type ) const
overrideprotectedvirtual

Implements CDatabaseQueryRule.

◆ GetFields()

std::vector< Field > KODI::PLAYLIST::CSmartPlaylistRule::GetFields ( const std::string & type)
static

◆ GetFieldType()

CDatabaseQueryRule::FIELD_TYPE KODI::PLAYLIST::CSmartPlaylistRule::GetFieldType ( int field) const
overridevirtual

Implements CDatabaseQueryRule.

◆ GetGroups()

std::vector< Field > KODI::PLAYLIST::CSmartPlaylistRule::GetGroups ( const std::string & type)
static

◆ GetLocalizedField()

std::string KODI::PLAYLIST::CSmartPlaylistRule::GetLocalizedField ( int field)
static

◆ GetLocalizedGroup()

std::string KODI::PLAYLIST::CSmartPlaylistRule::GetLocalizedGroup ( Field group)
static

◆ GetLocalizedRule()

std::string KODI::PLAYLIST::CSmartPlaylistRule::GetLocalizedRule ( ) const

◆ GetOperator()

CDatabaseQueryRule::SEARCH_OPERATOR KODI::PLAYLIST::CSmartPlaylistRule::GetOperator ( const std::string & type) const
overrideprotectedvirtual
Todo
SMARTPLAYLISTS do we really need this, or should we just make this field the premiered date and request a date?

Reimplemented from CDatabaseQueryRule.

◆ GetOrders()

std::vector< SortBy > KODI::PLAYLIST::CSmartPlaylistRule::GetOrders ( const std::string & type)
static

◆ IsFieldBrowseable()

bool KODI::PLAYLIST::CSmartPlaylistRule::IsFieldBrowseable ( int field)
static

◆ TranslateField() [1/2]

int KODI::PLAYLIST::CSmartPlaylistRule::TranslateField ( const char * field) const
overrideprotectedvirtual

Implements CDatabaseQueryRule.

◆ TranslateField() [2/2]

std::string KODI::PLAYLIST::CSmartPlaylistRule::TranslateField ( int field) const
overrideprotectedvirtual

Implements CDatabaseQueryRule.

◆ TranslateGroup() [1/2]

Field KODI::PLAYLIST::CSmartPlaylistRule::TranslateGroup ( const char * group)
static

◆ TranslateGroup() [2/2]

std::string KODI::PLAYLIST::CSmartPlaylistRule::TranslateGroup ( Field group)
static

◆ TranslateOrder() [1/2]

SortBy KODI::PLAYLIST::CSmartPlaylistRule::TranslateOrder ( const char * order)
static

◆ TranslateOrder() [2/2]

std::string KODI::PLAYLIST::CSmartPlaylistRule::TranslateOrder ( SortBy order)
static

◆ Validate()

bool KODI::PLAYLIST::CSmartPlaylistRule::Validate ( const std::string & input,
void * data )
static

◆ ValidateMyRating()

bool KODI::PLAYLIST::CSmartPlaylistRule::ValidateMyRating ( const std::string & input,
void * data )
static

◆ ValidateRating()

bool KODI::PLAYLIST::CSmartPlaylistRule::ValidateRating ( const std::string & input,
void * data )
static

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