Пример #1
0
// Load server URL
void SoffidEssoManager::LoadServerURL ()
{
	std::string firstServer;	// First server of list
	std::string servers;		// List of available servers
	size_t pos;					// End post for first server

	SeyconCommon::getServerList(servers);

	// Search delimiter of servers on list
	pos = servers.find(",");

	// Check search first server
	if (pos != std::string::npos)
	{
		setServerUrl(servers.substr(0, pos));
	}

	else
	{
		setServerUrl(servers);
	}

	// Get server port
	setServerPort(SeyconCommon::getServerPort());
}
Пример #2
0
MHSyncItemInfo::MHSyncItemInfo(MHSyncItemInfo& copy) {
    iD = copy.getId();
    setGuid(copy.getGuid());
    setLuid(copy.getLuid());
    setName(copy.getName());
    setSize(copy.getSize());
    setServerUrl(copy.getServerUrl());
    setContentType(copy.getContentType());
    setCreationDate(copy.getCreationDate());
    setModificationDate(copy.getModificationDate());
    setStatus(copy.getStatus());
    setServerLastUpdate(copy.getServerLastUpdate());
    setRemoteItemUrl(copy.getRemoteItemUrl());
    setRemoteThumbUrl(copy.getRemoteThumbUrl());
    setRemotePreviewUrl(copy.getRemotePreviewUrl());
    setLocalThumbPath(copy.getLocalThumbPath());
    setLocalPreviewPath(copy.getLocalPreviewPath());
    setLocalItemPath(copy.getLocalItemPath());
    
    setLocalItemETag(copy.getLocalItemETag().c_str());
    setLocalThumbETag(copy.getLocalThumbETag().c_str());
    setLocalPreviewETag(copy.getLocalPreviewETag().c_str());

    setRemoteItemETag(copy.getRemoteItemETag().c_str());
    setRemoteThumbETag(copy.getRemoteThumbETag().c_str());
    setRemotePreviewETag(copy.getRemotePreviewETag().c_str());
    
    setItemExifData(copy.exifData);
    setItemVideoMetadata(copy.videoMetadata);
    setExportedServices(copy.exportedServices);
    setShared(copy.shared);
    setNumUploadFailures(copy.numUploadFailures);
}
Пример #3
0
void OptionsWidget::createSettings()
{
  m_settings.setValue("channel", m_channelEdit->text());
  m_settings.setValue("user", m_nameEdit->text());
  m_settings.setValue("password", m_passwordEdit->text());

  QNetworkProxy::ProxyType proxy_type = (QNetworkProxy::ProxyType)m_proxyType->itemData(m_proxyType->currentIndex()).toInt();
  m_settings.setValue("proxy_type", proxy_type);
  if(proxy_type != QNetworkProxy::DefaultProxy && proxy_type != QNetworkProxy::NoProxy)
  {
    m_settings.setValue("proxy_host", m_proxyHostEdit->text());
    m_settings.setValue("proxy_port", m_proxyPortEdit->value());
  }
  else
  {
    m_settings.remove("proxy_host");
    m_settings.remove("proxy_port");
  }

  setServerUrl(m_serverUrlEdit->text());
  setServerPort(m_serverPortEdit->value());

  m_settings.setValue("cache_type", m_cacheType->itemData(m_cacheType->currentIndex()).toInt());
  if(m_cacheType->itemData(m_cacheType->currentIndex()).toInt() > 0)
    m_settings.setValue("cache_path", m_cachePath->text());
  else
  if (m_productName == "tracker")
  {
    m_settings.setValue("visibleName", m_visibleNameEdit->text());
  }
  m_settings.remove("cache_path");
  m_settings.setValue("magic", APP_MAGIC);
}
Пример #4
0
void OwncloudSetupPage::setupCustomization()
{
    // set defaults for the customize labels.

    // _ui.topLabel->hide();
    _ui.bottomLabel->hide();

    Theme *theme = Theme::instance();
    QVariant variant = theme->customMedia( Theme::oCSetupTop );
    if( variant.isNull() ) {
        _ui.topLabel->setOpenExternalLinks(true);
        _ui.topLabel->setText("If you don't have an ownCloud server yet, see <a href=\"https://owncloud.com\">owncloud.com</a> for more info.");
    } else {
        setupCustomMedia( variant, _ui.topLabel );
    }

    variant = theme->customMedia( Theme::oCSetupBottom );
    setupCustomMedia( variant, _ui.bottomLabel );

    QString fixUrl = theme->overrideServerUrl();
    if( !fixUrl.isEmpty() ) {
        setServerUrl( fixUrl );
        _ui.leUrl->setEnabled( false );
        _ui.leUrl->hide();
    }
}
Пример #5
0
MHSyncItemInfo::MHSyncItemInfo(unsigned long id_,
                               const char* guid, 
                               const char* luid, 
                               const char* name, 
                               int64_t size,
                               const char* serverUrl,
                               const char* contentType, 
                               int64_t creationDate, 
                               int64_t modificationDate,
                               EItemInfoStatus status, 
                               time_t serverLastUpdate,
                               const char* remoteItemUrl,
                               const char* remoteThumbUrl,
                               const char* remotePreviewUrl,
                               const char* localThumbPath,
                               const char* localPreviewPath,
                               const char* localItemPath_,
                               const char* remoteItemETag,
                               const char* remoteThumbETag,
                               const char* remotePreviewETag)
{
    iD = id_;
    
    setGuid(guid);
    setLuid(luid);
    
    setName(name);
    this->size = size;
    
    setServerUrl(serverUrl);
    setContentType(contentType);

    this->creationDate = creationDate;
    this->modificationDate = modificationDate;

    this->status = status;
    this->serverLastUpdate  = serverLastUpdate; 

    setRemoteItemUrl(remoteItemUrl);
    setRemoteThumbUrl(remoteThumbUrl);
    setRemotePreviewUrl(remotePreviewUrl);
    setRemoteItemETag(remoteItemETag);
    setLocalThumbPath(localThumbPath);
    setLocalPreviewPath(localPreviewPath);
    setLocalItemPath(localItemPath_);
    setRemoteThumbETag(remoteThumbETag);
    setRemotePreviewETag(remotePreviewETag);
    
    setLocalItemETag("");
    setLocalPreviewETag("");
    setLocalThumbETag("");
    
    numUploadFailures = 0;
    exportedServices.clear();
    setValidationStatus(EValidationStatusUnknown);
}
Пример #6
0
void OwncloudSetupPage::setupCustomization()
{
    // set defaults for the customize labels.
    _ui.topLabel->hide();
    _ui.bottomLabel->hide();

    Theme *theme = Theme::instance();
    QVariant variant = theme->customMedia( Theme::oCSetupTop );
    if( !variant.isNull() ) {
        WizardCommon::setupCustomMedia( variant, _ui.topLabel );
    }

    variant = theme->customMedia( Theme::oCSetupBottom );
    WizardCommon::setupCustomMedia( variant, _ui.bottomLabel );

    QString fixUrl = theme->overrideServerUrl();
    if( !fixUrl.isEmpty() ) {
        _ui.label_2->hide();
        setServerUrl( fixUrl );
        _ui.leUrl->setEnabled( false );
        _ui.leUrl->hide();
    }
}
Пример #7
0
// Save configuration
bool SoffidEssoManager::SaveConfiguration ()
{
	bool saveConfigOK = true;		// Save config status

	// Save enable close session
	SeyconCommon::writeProperty("EnableCloseSession", getEnableCloseSession().c_str());

	// Save enable close session
	SeyconCommon::writeProperty("enableLocalAccounts", getEnableSharedSession().c_str());

	// Save login on startup
	SeyconCommon::writeProperty("ForceStartupLogin", getForceLogin().c_str());

	// Save GINA dll (only Windows XP OS)
	SaveGINAConfiguration();

	// Save login type
	SeyconCommon::writeProperty("LoginType", getLoginType().c_str());

	// Save server URL
	setServerUrl(getServerUrl());

	return saveConfigOK;
}
Пример #8
0
void RepositoryProfile::setServerUrl ( const QString & newUrl )
{
  setServerUrl ( QUrl ( newUrl ) );
}