HTTP LIB - Fine tuning

This commit is contained in:
Andre Iwers 2024-02-05 12:11:01 +00:00 committed by Jon Evans
parent 835500bf1c
commit a0c39715df
3 changed files with 10 additions and 16 deletions

View File

@ -342,6 +342,10 @@ void SCH_IO_HTTP_LIB::connect()
if( !m_conn->IsValidEndpoint() )
{
m_lastError = m_conn->GetLastError();
// Make sure we release pointer so we are able to query API again next time
m_conn.release();
return;
}
}

View File

@ -38,7 +38,6 @@
class SCH_IO_HTTP_LIB : public SCH_IO
{
public:
SCH_IO_HTTP_LIB();
virtual ~SCH_IO_HTTP_LIB();
@ -50,12 +49,10 @@ public:
int GetModifyHash() const override { return 0; }
void EnumerateSymbolLib( wxArrayString& aSymbolNameList,
const wxString& aLibraryPath,
void EnumerateSymbolLib( wxArrayString& aSymbolNameList, const wxString& aLibraryPath,
const STRING_UTF8_MAP* aProperties = nullptr ) override;
void EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
const wxString& aLibraryPath,
void EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList, const wxString& aLibraryPath,
const STRING_UTF8_MAP* aProperties = nullptr ) override;
LIB_SYMBOL* LoadSymbol( const wxString& aLibraryPath, const wxString& aAliasName,
@ -69,23 +66,17 @@ public:
void GetDefaultSymbolFields( std::vector<wxString>& aNames ) override;
bool IsLibraryWritable( const wxString& aLibraryPath ) override
{
// TODO: HTTP libraries are well capabale of supporting this.
return false;
}
void SetLibTable( SYMBOL_LIB_TABLE* aTable ) override
{
m_libTable = aTable;
}
bool IsLibraryWritable( const wxString& aLibraryPath ) override { return false; }
void SetLibTable( SYMBOL_LIB_TABLE* aTable ) override { m_libTable = aTable; }
HTTP_LIB_SETTINGS* Settings() const { return m_settings.get(); }
void SaveSymbol( const wxString& aLibraryPath, const LIB_SYMBOL* aSymbol,
const STRING_UTF8_MAP* aProperties = nullptr ) override;
const wxString& GetError() const override { return m_lastError; }
private:
void ensureSettings( const wxString& aSettingsPath );

View File

@ -88,7 +88,6 @@ private:
wxString httpErrorCodeDescription( uint16_t aHttpCode );
HTTP_LIB_SOURCE_TYPE m_sourceType;
HTTP_LIB_SOURCE m_source;
// part.id part