SOMHunter Core
network-api.cpp File Reference
#include "somhunter.h"
#include "network-api.h"
#include <algorithm>
Include dependency graph for network-api.cpp:

Functions

template<typename _ElemType >
std::vector< _ElemType > from_JSON_array (json::value x)
 
template<typename _ElemType >
std::vector< _ElemType > from_double_array (json::value x)
 
json::value to_QueryFilters (Somhunter *, const SearchContext &search_ctx)
 OpenAPI: QueryFilters. More...
 
json::value to_FrameReference (Somhunter *, const VideoFrame *p_frame, const LikesCont &likes, const BookmarksCont &_bookmarks, const ScreenVideosCont &_videos_seen, const std::string &path_prefix)
 OpenAPI: FrameReference. More...
 
json::value canvas_to_json (const CanvasSubqueryBitmap &q)
 
json::value canvas_to_json (const CanvasSubqueryText &q)
 
json::value to_SearchContext (Somhunter *p_core, const UserContext &ctx)
 
json::value to_HistoryArray (Somhunter *, const std::vector< SearchContext > &_history)
 
json::value to_Response__User__Context__Get (Somhunter *p_core, const UserContext &ctx)
 OpenAPI: Response__User__Context__Get. More...
 
json::value to_Response__GetTopScreen__Post (Somhunter *p_core, const GetDisplayResult &res, size_t page_num, const std::string &type, const std::string &path_prefix)
 OpenAPI: Response__GetTopScreen__Post. More...
 
json::value to_Response__GetDetailScreen__Post (Somhunter *p_core, const GetDisplayResult &res, size_t page_num, const std::string &, const std::string &path_prefix)
 
json::value to_Response__GetAutocompleteResults__Get (Somhunter *, const std::vector< const Keyword * > &kws, size_t example_count, const std::string &path_prefix)
 
json::value to_Response__Rescore__Post (Somhunter *p_core, const RescoreResult &rescore_res)
 
void handle_options (http_request request)
 

Function Documentation

◆ canvas_to_json() [1/2]

json::value canvas_to_json ( const CanvasSubqueryBitmap q)
Here is the call graph for this function:

◆ canvas_to_json() [2/2]

json::value canvas_to_json ( const CanvasSubqueryText q)
Here is the call graph for this function:

◆ from_double_array()

template<typename _ElemType >
std::vector<_ElemType> from_double_array ( json::value  x)

◆ from_JSON_array()

template<typename _ElemType >
std::vector<_ElemType> from_JSON_array ( json::value  x)

◆ handle_options()

void handle_options ( http_request  request)

◆ to_FrameReference()

json::value to_FrameReference ( Somhunter ,
const VideoFrame p_frame,
const LikesCont likes,
const BookmarksCont _bookmarks,
const ScreenVideosCont _videos_seen,
const std::string &  path_prefix 
)

OpenAPI: FrameReference.

◆ to_HistoryArray()

json::value to_HistoryArray ( Somhunter ,
const std::vector< SearchContext > &  _history 
)

◆ to_QueryFilters()

json::value to_QueryFilters ( Somhunter ,
const SearchContext search_ctx 
)

OpenAPI: QueryFilters.

◆ to_Response__GetAutocompleteResults__Get()

json::value to_Response__GetAutocompleteResults__Get ( Somhunter ,
const std::vector< const Keyword * > &  kws,
size_t  example_count,
const std::string &  path_prefix 
)

◆ to_Response__GetDetailScreen__Post()

json::value to_Response__GetDetailScreen__Post ( Somhunter p_core,
const GetDisplayResult res,
size_t  page_num,
const std::string &  ,
const std::string &  path_prefix 
)
Here is the call graph for this function:

◆ to_Response__GetTopScreen__Post()

json::value to_Response__GetTopScreen__Post ( Somhunter p_core,
const GetDisplayResult res,
size_t  page_num,
const std::string &  type,
const std::string &  path_prefix 
)

OpenAPI: Response__GetTopScreen__Post.

Here is the call graph for this function:

◆ to_Response__Rescore__Post()

json::value to_Response__Rescore__Post ( Somhunter p_core,
const RescoreResult rescore_res 
)
Here is the call graph for this function:

◆ to_Response__User__Context__Get()

json::value to_Response__User__Context__Get ( Somhunter p_core,
const UserContext ctx 
)

OpenAPI: Response__User__Context__Get.

Here is the call graph for this function:

◆ to_SearchContext()

json::value to_SearchContext ( Somhunter p_core,
const UserContext ctx 
)
Here is the call graph for this function: