DECENT
Functions

Functions

vector< account_id_type > graphene::app::database_api::list_publishing_managers (const string &lower_bound_name, uint32_t limit) const
 Get a list of accounts holding publishing manager status. More...
 
vector< buying_object > graphene::app::database_api::get_open_buyings () const
 Get a list of open buyings. More...
 
vector< buying_object > graphene::app::database_api::get_open_buyings_by_URI (const string &URI) const
 Get a list of open buyings by URI. More...
 
vector< buying_object > graphene::app::database_api::get_open_buyings_by_consumer (const account_id_type &consumer) const
 Get a list of open buyings by consumer. More...
 
vector< buying_object > graphene::app::database_api::get_buying_history_objects_by_consumer (const account_id_type &consumer) const
 Get history buying objects by consumer. More...
 
vector< buying_object > graphene::app::database_api::get_buying_objects_by_consumer (const account_id_type &consumer, const string &order, const object_id_type &id, const string &term, uint32_t count) const
 Get buying objects (open or history) by consumer. More...
 
optional< buying_object > graphene::app::database_api::get_buying_by_consumer_URI (const account_id_type &consumer, const string &URI) const
 Get buying (open or history) by consumer and URI. More...
 
vector< buying_object > graphene::app::database_api::search_feedback (const string &user, const string &URI, const object_id_type &id, uint32_t count) const
 Search for term in contents (author, title and description). More...
 
optional< content_object > graphene::app::database_api::get_content (const string &URI) const
 Get a content by URI. More...
 
content_keys graphene::app::database_api::generate_content_keys (vector< account_id_type > const &seeders) const
 Generate keys for new content submission. More...
 
fc::sha256 graphene::app::database_api::restore_encryption_key (DIntegerString el_gamal_priv_key_string, buying_id_type buying) const
 Restores encryption key from key parts stored in buying object. More...
 
vector< content_summary > graphene::app::database_api::search_content (const string &term, const string &order, const string &user, const string &region_code, const object_id_type &id, const string &type, uint32_t count) const
 Search for term in contents (author, title and description). More...
 
vector< seeder_object > graphene::app::database_api::list_seeders_by_price (uint32_t count) const
 Get a list of seeders by price, in increasing order. More...
 
vector< seeder_object > graphene::app::database_api::list_publishers_by_price (uint32_t count) const
 Get a list of seeders by price, in increasing order. Same method as list_seeders_by_price, kept for compatibility. More...
 
optional< seeder_object > graphene::app::database_api::get_seeder (account_id_type aid) const
 Get a seeder by ID. More...
 
optional< vector< seeder_object > > graphene::app::database_api::list_seeders_by_upload (const uint32_t count) const
 Get a list of seeders by total upload, in decreasing order. More...
 
vector< seeder_object > graphene::app::database_api::list_seeders_by_region (const string region_code) const
 Get a list of seeders by region code. More...
 
vector< seeder_object > graphene::app::database_api::list_seeders_by_rating (const uint32_t count) const
 Get a list of seeders by rating, in decreasing order. More...
 
optional< subscription_object > graphene::app::database_api::get_subscription (const subscription_id_type &sid) const
 Get a subscription object by ID. More...
 
vector< subscription_object > graphene::app::database_api::list_active_subscriptions_by_consumer (const account_id_type &account, const uint32_t count) const
 Get a list of active (not expired) subscriptions subscribed by account (consumer). More...
 
vector< subscription_object > graphene::app::database_api::list_subscriptions_by_consumer (const account_id_type &account, const uint32_t count) const
 Get a list of subscriptions subscribed by account (consumer). More...
 
vector< subscription_object > graphene::app::database_api::list_active_subscriptions_by_author (const account_id_type &account, const uint32_t count) const
 Get a list of active (not expired) subscriptions to account (author). More...
 
vector< subscription_object > graphene::app::database_api::list_subscriptions_by_author (const account_id_type &account, const uint32_t count) const
 Get a list of subscriptions subscribed to account (author). More...
 

Detailed Description

Function Documentation

content_keys graphene::app::database_api::generate_content_keys ( vector< account_id_type > const &  seeders) const

Generate keys for new content submission.

Parameters
seederslist of seeder account IDs
Returns
generated key, key parts and quorum

Definition at line 1912 of file database_api.cpp.

optional< buying_object > graphene::app::database_api::get_buying_by_consumer_URI ( const account_id_type consumer,
const string &  URI 
) const

Get buying (open or history) by consumer and URI.

Parameters
consumerconsumer of the buying to retrieve
URIURI of the buying to retrieve
Returns
buying object corresponding to the provided consumer and URI

Definition at line 2027 of file database_api.cpp.

vector< buying_object > graphene::app::database_api::get_buying_history_objects_by_consumer ( const account_id_type consumer) const

Get history buying objects by consumer.

Parameters
consumerconsumer of the history buyings to retrieve
Returns
history buying objects corresponding to the provided consumer

Definition at line 1758 of file database_api.cpp.

vector< buying_object > graphene::app::database_api::get_buying_objects_by_consumer ( const account_id_type consumer,
const string &  order,
const object_id_type &  id,
const string &  term,
uint32_t  count 
) const

Get buying objects (open or history) by consumer.

Parameters
consumerconsumer of the buyings to retrieve
orderordering field. Available options are defined in 'database_api.cpp'
idthe id of buying object to start searching from
termsearch term
countmaximum number of contents to fetch (must not exceed 100)
Returns
buying objects corresponding to the provided consumer

Definition at line 1781 of file database_api.cpp.

optional< content_object > graphene::app::database_api::get_content ( const string &  URI) const

Get a content by URI.

Parameters
URIURI of the content to retrieve
Returns
the content corresponding to the provided URI, or null if no matching content was found

Definition at line 1869 of file database_api.cpp.

vector< buying_object > graphene::app::database_api::get_open_buyings ( ) const

Get a list of open buyings.

Returns
a list of buying objects

Definition at line 1697 of file database_api.cpp.

vector< buying_object > graphene::app::database_api::get_open_buyings_by_consumer ( const account_id_type consumer) const

Get a list of open buyings by consumer.

Parameters
consumerconsumer of the buyings to retrieve
Returns
a list of buyings corresponding to the provided consumer

Definition at line 1736 of file database_api.cpp.

vector< buying_object > graphene::app::database_api::get_open_buyings_by_URI ( const string &  URI) const

Get a list of open buyings by URI.

Parameters
URIURI of the buyings to retrieve
Returns
a list of buyings corresponding to the provided URI

Definition at line 1715 of file database_api.cpp.

optional< seeder_object > graphene::app::database_api::get_seeder ( account_id_type  aid) const

Get a seeder by ID.

Parameters
aidID of the seeder to retrieve
Returns
the seeder corresponding to the provided ID, or null if no matching content was found

Definition at line 1945 of file database_api.cpp.

optional< subscription_object > graphene::app::database_api::get_subscription ( const subscription_id_type sid) const

Get a subscription object by ID.

Parameters
sidID of the subscription to retrieve
Returns
the subscription object corresponding to the provided ID, or null if no matching subscription was found

Definition at line 2055 of file database_api.cpp.

vector< subscription_object > graphene::app::database_api::list_active_subscriptions_by_author ( const account_id_type account,
const uint32_t  count 
) const

Get a list of active (not expired) subscriptions to account (author).

Parameters
accountID of the account to get subscriptions for
countmaximum number of subscription objects to fetch (must not exceed 100)
Returns
the contents found

Definition at line 2117 of file database_api.cpp.

vector< subscription_object > graphene::app::database_api::list_active_subscriptions_by_consumer ( const account_id_type account,
const uint32_t  count 
) const

Get a list of active (not expired) subscriptions subscribed by account (consumer).

Parameters
accountID of the account to get subscriptions for
countmaximum number of subscription objects to fetch (must not exceed 100)
Returns
a list of subscription objects corresponding to the provided consumer

Definition at line 2069 of file database_api.cpp.

vector< seeder_object > graphene::app::database_api::list_publishers_by_price ( uint32_t  count) const

Get a list of seeders by price, in increasing order. Same method as list_seeders_by_price, kept for compatibility.

Parameters
countmaximum number of seeders to retrieve
Returns
the seeders found

Definition at line 2332 of file database_api.cpp.

vector< account_id_type > graphene::app::database_api::list_publishing_managers ( const string &  lower_bound_name,
uint32_t  limit 
) const

Get a list of accounts holding publishing manager status.

Parameters
lower_bound_namethe name of the first account to return. If the named account does not exist, the list will start at the account that comes after lowerbound
limitthe maximum number of accounts to return (max: 100)
Returns
a list of publishing managers

Definition at line 1678 of file database_api.cpp.

vector< seeder_object > graphene::app::database_api::list_seeders_by_price ( uint32_t  count) const

Get a list of seeders by price, in increasing order.

Parameters
countmaximum number of seeders to retrieve
Returns
the seeders found

Definition at line 2328 of file database_api.cpp.

vector< seeder_object > graphene::app::database_api::list_seeders_by_rating ( const uint32_t  count) const

Get a list of seeders by rating, in decreasing order.

Parameters
countmaximum number of seeders to retrieve
Returns
the seeders found

Definition at line 2407 of file database_api.cpp.

vector< seeder_object > graphene::app::database_api::list_seeders_by_region ( const string  region_code) const

Get a list of seeders by region code.

Parameters
region_coderegion code of seeders to retrieve
Returns
the seeders found

Definition at line 2384 of file database_api.cpp.

optional< vector< seeder_object > > graphene::app::database_api::list_seeders_by_upload ( const uint32_t  count) const

Get a list of seeders by total upload, in decreasing order.

Parameters
countmaximum number of seeders to retrieve
Returns
the seeders found

Definition at line 2359 of file database_api.cpp.

vector< subscription_object > graphene::app::database_api::list_subscriptions_by_author ( const account_id_type account,
const uint32_t  count 
) const

Get a list of subscriptions subscribed to account (author).

Parameters
accountID of the account to get subscriptions for
countmaximum number of subscription objects to fetch (must not exceed 100)
Returns
the contents found

Definition at line 2141 of file database_api.cpp.

vector< subscription_object > graphene::app::database_api::list_subscriptions_by_consumer ( const account_id_type account,
const uint32_t  count 
) const

Get a list of subscriptions subscribed by account (consumer).

Parameters
accountID of the account to get subscriptions for
countmaximum number of subscription objects to fetch (must not exceed 100)
Returns
the contents found

Definition at line 2091 of file database_api.cpp.

fc::sha256 graphene::app::database_api::restore_encryption_key ( DIntegerString  el_gamal_priv_key_string,
buying_id_type  buying 
) const

Restores encryption key from key parts stored in buying object.

Parameters
el_gamal_priv_key_stringthe private El Gamal key
buyingthe buying object
Returns
AES encryption key

Definition at line 1874 of file database_api.cpp.

vector< content_summary > graphene::app::database_api::search_content ( const string &  term,
const string &  order,
const string &  user,
const string &  region_code,
const object_id_type &  id,
const string &  type,
uint32_t  count 
) const

Search for term in contents (author, title and description).

Parameters
termsearch term
orderordering field. Available options are defined in 'database_api.cpp'
usercontent owner
region_codetwo letter region code
idthe id of content object to start searching from
typethe application and content type to be filtered
countmaximum number of contents to fetch (must not exceed 100)
Returns
the contents found

Definition at line 2167 of file database_api.cpp.

vector< buying_object > graphene::app::database_api::search_feedback ( const string &  user,
const string &  URI,
const object_id_type &  id,
uint32_t  count 
) const

Search for term in contents (author, title and description).

Parameters
userfeedback author
URIthe content object uri
idthe id of feedback object to start searching from
countmaximum number of feedbacks to fetch
Returns
the feedback found

Definition at line 1959 of file database_api.cpp.