wxGxObject* wxGxDiscConnections::CreateChildGxObject(const wxXmlNode* pNode)
{
    wxString soName = pNode->GetAttribute(wxT("name"), NONAME);
    wxString sPath = pNode->GetAttribute(wxT("path"), NONAME);
    CPLString soPath(sPath.mb_str(wxConvUTF8));
    int nXmlId = GetDecimalValue(pNode, wxT("id"), wxNOT_FOUND);
    if(sPath == NONAME || nXmlId == wxNOT_FOUND)
        return NULL;
    return new wxGxDiscConnection(this, m_sXmlStoragePath, nXmlId, soName, soPath);
}
QString org_blueberry_core_runtime_Activator::getPluginId(void *symbol)
{
  if (symbol == nullptr) return QString();

  Dl_info info = {nullptr,nullptr,nullptr,nullptr};
  if(dladdr(symbol, &info) == 0)
  {
    return QString();
  }
  else if(info.dli_fname)
  {
    QFile soPath(info.dli_fname);
    int index = soPath.fileName().lastIndexOf('.');
    QString pluginId = soPath.fileName().left(index);
    if (pluginId.startsWith("lib"))
      pluginId = pluginId.mid(3);
    return pluginId.replace('_', '.');
  }
  return QString();
}
wxGxObject *wxGxDiscConnectionsUI::CreateChildGxObject(const wxJSONValue& GxObjConfValue)
{
    if(!m_Conn16.IsOk())
        m_Conn16 = wxIcon(folder_conn_16_xpm);
    if(!m_Conn48.IsOk())
        m_Conn48 = wxIcon(folder_conn_48_xpm);
    if(!m_ConnDsbld16.IsOk())
    {
        wxImage Img(folder_conn_16_xpm);
        m_ConnDsbld16.CopyFromBitmap(Img.ConvertToGreyscale());
    }
    if(!m_ConnDsbld48.IsOk())
    {
        wxImage Img(folder_conn_48_xpm);
        m_ConnDsbld48.CopyFromBitmap(Img.ConvertToGreyscale());
    }

    wxString soName = GxObjConfValue[wxT("name")].AsString();
    wxString sPath = GxObjConfValue[wxT("path")].AsString();
    CPLString soPath(sPath.mb_str(wxConvUTF8));
    int nStoreId = GxObjConfValue[wxT("id")].AsInt();
    return new wxGxDiscConnectionUI(this, nStoreId, soName, soPath, m_Conn16, m_Conn48, m_ConnDsbld16, m_ConnDsbld48);
}