1 #ifndef PSGS_RESOLVEPROCESSOR__HPP 2 #define PSGS_RESOLVEPROCESSOR__HPP 3 4 /* $Id: resolve_processor.hpp 629837 2021-04-22 12:47:49Z ivanov $ 5 * =========================================================================== 6 * 7 * PUBLIC DOMAIN NOTICE 8 * National Center for Biotechnology Information 9 * 10 * This software/database is a "United States Government Work" under the 11 * terms of the United States Copyright Act. It was written as part of 12 * the author's official duties as a United States Government employee and 13 * thus cannot be copyrighted. This software/database is freely available 14 * to the public for use. The National Library of Medicine and the U.S. 15 * Government have not placed any restriction on its use or reproduction. 16 * 17 * Although all reasonable efforts have been taken to ensure the accuracy 18 * and reliability of the software and data, the NLM and the U.S. 19 * Government do not and cannot warrant the performance or results that 20 * may be obtained by using this software or data. The NLM and the U.S. 21 * Government disclaim all warranties, express or implied, including 22 * warranties of performance, merchantability or fitness for any particular 23 * purpose. 24 * 25 * Please cite the author in any work or product based on this material. 26 * 27 * =========================================================================== 28 * 29 * Authors: Sergey Satskiy 30 * 31 * File Description: resolve processor 32 * 33 */ 34 35 #include "resolve_base.hpp" 36 37 USING_NCBI_SCOPE; 38 USING_IDBLOB_SCOPE; 39 40 // Forward declaration 41 class CCassFetch; 42 43 44 class CPSGS_ResolveProcessor : public CPSGS_ResolveBase 45 { 46 public: 47 virtual IPSGS_Processor* CreateProcessor(shared_ptr<CPSGS_Request> request, 48 shared_ptr<CPSGS_Reply> reply, 49 TProcessorPriority priority) const; 50 virtual void Process(void); 51 virtual void Cancel(void); 52 virtual EPSGS_Status GetStatus(void); 53 virtual string GetName(void) const; 54 virtual void ProcessEvent(void); 55 56 public: 57 CPSGS_ResolveProcessor(); 58 CPSGS_ResolveProcessor(shared_ptr<CPSGS_Request> request, 59 shared_ptr<CPSGS_Reply> reply, 60 TProcessorPriority priority); 61 virtual ~CPSGS_ResolveProcessor(); 62 63 private: 64 void x_OnResolutionGoodData(void); 65 void x_OnSeqIdResolveError( 66 CRequestStatus::ECode status, 67 int code, 68 EDiagSev severity, 69 const string & message); 70 void x_OnSeqIdResolveFinished( 71 SBioseqResolution && bioseq_resolution); 72 void x_SendBioseqInfo(SBioseqResolution & bioseq_resolution); 73 74 private: 75 void x_Peek(bool need_wait); 76 bool x_Peek(unique_ptr<CCassFetch> & fetch_details, 77 bool need_wait); 78 79 private: 80 SPSGS_ResolveRequest * m_ResolveRequest; 81 }; 82 83 #endif // PSGS_RESOLVEPROCESSOR__HPP 84 85