NCBI C++ ToolKit
Classes | Functions | Variables
nst_protocol_utils.hpp File Reference
#include <string>
#include <connect/services/json_over_uttp.hpp>
#include <connect/services/netstorage.hpp>
+ Include dependency graph for nst_protocol_utils.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  SCommonRequestArguments
 
struct  SICacheSettings
 
struct  SUserKey
 

Functions

void SetSessionAndIPAndPHID (const CJsonNode &message, const CSocket &peer)
 
SCommonRequestArguments ExtractCommonFields (const CJsonNode &message)
 
TNetStorageFlags ExtractStorageFlags (const CJsonNode &message)
 
SICacheSettings ExtractICacheSettings (const CJsonNode &message)
 
SUserKey ExtractUserKey (const CJsonNode &message)
 
CJsonNode CreateResponseMessage (Int8 serial_number)
 
CJsonNode CreateErrorResponseMessage (Int8 serial_number, Int8 error_code, const string &error_message, const string &scope, Int8 sub_code)
 
void AppendWarning (CJsonNode &message, Int8 code, const string &warning_message, const string &scope, Int8 sub_code)
 
void AppendError (CJsonNode &message, Int8 code, const string &error_message, const string &scope, Int8 sub_code, bool update_status=true)
 
CJsonNode CreateIssue (Int8 error_code, const string &error_message, const string &scope, Int8 sub_code)
 
bool GetReplyMessageProperties (const exception &ex, string *error_scope, Int8 *error_code, unsigned int *error_sub_code)
 

Variables

const string kStatusOK = "OK"
 
const string kStatusError = "ERROR"
 
const string kMessageTypeReply = "REPLY"
 
const string kScopeStdException = "std::exception"
 
const string kScopeUnknownException = "unknown_exception"
 
const string kScopeIMessage = "IMessage"
 
const string kScopeLogic = "logic"
 

Function Documentation

◆ AppendError()

void AppendError ( CJsonNode message,
Int8  code,
const string error_message,
const string scope,
Int8  sub_code,
bool  update_status = true 
)

◆ AppendWarning()

void AppendWarning ( CJsonNode message,
Int8  code,
const string warning_message,
const string scope,
Int8  sub_code 
)

◆ CreateErrorResponseMessage()

CJsonNode CreateErrorResponseMessage ( Int8  serial_number,
Int8  error_code,
const string error_message,
const string scope,
Int8  sub_code 
)

◆ CreateIssue()

CJsonNode CreateIssue ( Int8  error_code,
const string error_message,
const string scope,
Int8  sub_code 
)

◆ CreateResponseMessage()

CJsonNode CreateResponseMessage ( Int8  serial_number)

◆ ExtractCommonFields()

SCommonRequestArguments ExtractCommonFields ( const CJsonNode message)

◆ ExtractICacheSettings()

SICacheSettings ExtractICacheSettings ( const CJsonNode message)

◆ ExtractStorageFlags()

TNetStorageFlags ExtractStorageFlags ( const CJsonNode message)

◆ ExtractUserKey()

SUserKey ExtractUserKey ( const CJsonNode message)

◆ GetReplyMessageProperties()

bool GetReplyMessageProperties ( const exception &  ex,
string error_scope,
Int8 error_code,
unsigned int error_sub_code 
)

◆ SetSessionAndIPAndPHID()

void SetSessionAndIPAndPHID ( const CJsonNode message,
const CSocket peer 
)

Variable Documentation

◆ kMessageTypeReply

const string kMessageTypeReply = "REPLY"

Definition at line 48 of file nst_protocol_utils.hpp.

Referenced by CreateErrorResponseMessage(), and CreateResponseMessage().

◆ kScopeIMessage

const string kScopeIMessage = "IMessage"

Definition at line 53 of file nst_protocol_utils.hpp.

Referenced by CNetStorageHandler::x_ProcessLockFTPath().

◆ kScopeLogic

const string kScopeLogic = "logic"

◆ kScopeStdException

const string kScopeStdException = "std::exception"

◆ kScopeUnknownException

const string kScopeUnknownException = "unknown_exception"

◆ kStatusError

const string kStatusError = "ERROR"

Definition at line 47 of file nst_protocol_utils.hpp.

Referenced by AppendError(), and CreateErrorResponseMessage().

◆ kStatusOK

const string kStatusOK = "OK"

Definition at line 46 of file nst_protocol_utils.hpp.

Referenced by CreateResponseMessage().

Modified on Fri Sep 20 14:57:44 2024 by modify_doxy.py rev. 669887