shared_ptr<CPSGS_Reply> reply)
const 133shared_ptr<CPSGS_Reply> reply)
const 135 returnvector<string>();
149shared_ptr<CPSGS_Reply> reply,
340objects::CSeq_id& seq_id,
341 const string& request_seq_id,
342 intrequest_seq_id_type,
343 string* err_msg =
nullptr);
347 constobjects::CSeq_id& parsed_seq_id,
348 intrequest_seq_id_type,
377 constobjects::CSeq_id& parsed_seq_id,
378 intrequest_seq_id_type);
function< EPSGS_PollContinue(void *user_data)> TEventCB
function< EPSGS_PollContinue(void *user_data)> TTimeoutCB
function< EPSGS_PollContinue(const string &message, void *user_data)> TErrorCB
function< void(void *user_data)> TProcessorCB
Interface class (and self-factory) for request processor objects that can retrieve data from a given ...
virtual void Cancel(void)=0
The infrastructure request to cancel processing.
virtual string GetName(void) const =0
Tells the processor name (used in logging and tracing)
void SetUVThreadId(uv_thread_t uv_thread_id)
Saves the libuv worker thread id which runs the processor.
psg_time_point_t GetProcessInvokeTimestamp(bool &is_valid) const
Provides the timestamp of when the Process() method was called.
virtual IPSGS_Processor * CreateProcessor(shared_ptr< CPSGS_Request > request, shared_ptr< CPSGS_Reply > reply, TProcessorPriority priority) const =0
Create processor to fulfil PSG request using the data source.
static string StatusToString(EPSGS_Status status)
Converts the processor status to a string for tracing and logging purposes.
virtual EPSGS_Status GetStatus(void)=0
Tells the processor status (if it has finished or in progress)
virtual bool CanProcess(shared_ptr< CPSGS_Request > request, shared_ptr< CPSGS_Reply > reply) const
Tells if processor can process the given request.
virtual void Process(void)=0
Main processing function.
psg_time_point_t GetSignalFinishTimestamp(bool &is_valid) const
Provides the timestamp of when the processor called SignalFinishProcessing() method.
virtual ~IPSGS_Processor()
psg_time_point_t m_ProcessInvokeTimestamp
void OnBeforeProcess(void)
Called just before the virtual Process() method is called.
psg_time_point_t m_SignalStartTimestamp
void SetSocketCallback(int fd, CPSGS_SocketIOCallback::EPSGS_Event event, uint64_t timeout_millisec, void *user_data, CPSGS_SocketIOCallback::TEventCB event_cb, CPSGS_SocketIOCallback::TTimeoutCB timeout_cb, CPSGS_SocketIOCallback::TErrorCB error_cb)
The provided callbacks will be called from the libuv loop assigned to the processor when the correspo...
shared_ptr< CPSGS_Reply > GetReply(void) const
Provides the reply wrapper.
virtual vector< string > WhatCanProcess(shared_ptr< CPSGS_Request > request, shared_ptr< CPSGS_Reply > reply) const
Needs to be implemented only for the ID/get_na requests.
uv_thread_t GetUVThreadId(void) const
Provides the libuv thread id which runs the processor.
shared_ptr< CPSGS_Request > GetRequest(void) const
Provides the user request.
bool IsUVThreadAssigned(void) const
Tells if a libuv thread id has been assigned to the processor.
virtual string GetGroupName(void) const =0
Tells the processor group name.
shared_ptr< CPSGS_Reply > m_Reply
EPSGS_StartProcessing
Tells wether to continue or not after a processor called SignalStartProcessing() method.
psg_time_point_t GetSignalStartTimestamp(bool &is_valid) const
Provides the timestamp of when the processor called SignalStartProcessing() method.
bool m_SignalStartTimestampInitialized
bool GetEffectiveSeqIdType(const objects::CSeq_id &parsed_seq_id, int request_seq_id_type, int16_t &eff_seq_id_type, bool need_trace)
psg_time_point_t m_SignalFinishTimestamp
TProcessorPriority GetPriority(void) const
Provides the processor priority.
EPSGS_Status
The GetStatus() method returns a processor current status.
void PostponeInvoke(CPSGS_UvLoopBinder::TProcessorCB cb, void *user_data)
The provided callback will be called from the libuv loop assigned to the processor.
bool m_ProcessInvokeTimestampInitialized
void SignalFinishProcessing(void)
A processor should call this method when it decides that there is nothing else to be done.
EPSGS_StartProcessing SignalStartProcessing(void)
A processor should call the method when it decides that it successfully started processing the reques...
shared_ptr< CPSGS_Request > m_Request
bool m_SignalFinishTimestampInitialized
virtual void ProcessEvent(void)
Called when an event happened which may require to have some processing.
EPSGS_SeqIdParsingResult ParseInputSeqId(objects::CSeq_id &seq_id, const string &request_seq_id, int request_seq_id_type, string *err_msg=nullptr)
Parse seq-id from a string and type representation.
static string StatusToProgressMessage(EPSGS_Status status)
Converts the processor status to a string for protocol message.
TProcessorPriority m_Priority
static bool is_valid(const char *num, int type, CONV_RESULT *cr)
bool AreSeqIdTypesMatched(const objects::CSeq_id &parsed_seq_id, int request_seq_id_type)
psg_clock_t::time_point psg_time_point_t
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4