~unity-team/thumbnailer/devel

« back to all changes in this revision

Viewing changes to tests/utils/artserver.cpp

  • Committer: Tarmac
  • Author(s): Michi Henning
  • Date: 2017-02-07 04:03:30 UTC
  • mfrom: (365.4.12 snap)
  • Revision ID: tarmac-20170207040330-67dv5bt91rny2t1k
Adjust paths when running in a snap. Decision whether to adjust paths is now made at compile time. Also consolidated all the environment variable accesses into an EnvVar helper class.
Added home interface to service and admin tool for the time being. This allows local thumbnailing to work (but the apparmor credentials check is currently not doing the right thing).
videos don't thumbnail yet because we are not bundling the gstreamer codecs, I suspect.

Approved by James Henstridge, unity-api-1-bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
    {
80
80
        qCritical() << "Failed to terminate fake art server";
81
81
    }
82
 
    unsetenv(unity::thumbnailer::internal::UBUNTU_SERVER_URL);
 
82
    unsetenv(unity::thumbnailer::internal::EnvVars::UBUNTU_SERVER_URL);
83
83
}
84
84
 
85
85
std::string const& ArtServer::server_url() const
108
108
 
109
109
void ArtServer::update_env()
110
110
{
111
 
    setenv(unity::thumbnailer::internal::UBUNTU_SERVER_URL, server_url().c_str(), true);
 
111
    setenv(unity::thumbnailer::internal::EnvVars::UBUNTU_SERVER_URL, server_url().c_str(), true);
112
112
}