2
* Copyright (C) 2012 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by Pawel Stolowski <pawel.stolowski@canonical.com>
19
namespace Unity.VideoLens
21
public class RemoteUri
23
public string uri { get; set; }
24
public string title { get; set; }
25
public string icon { get; set; }
26
public string details_uri { get; set; }
29
public RemoteUri (string uri, string title, string icon, string details_uri)
34
this.details_uri = details_uri;
38
public static RemoteUri? from_rawuri (string raw_uri)
41
string[] args = raw_uri.split ("lens-meta://", 4);
44
uri = new RemoteUri (args[0], args[1], args[2], args[3]);
49
public string to_rawuri ()
51
return string.join ("lens-meta://", uri, title, icon, details_uri);