[Touch-packages] [Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-23 Thread Michi Henning
** Changed in: unity-scopes-api (Ubuntu) Status: New = Invalid -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to unity-scopes-api in Ubuntu. https://bugs.launchpad.net/bugs/1465675 Title: API needed to determine if

[Touch-packages] [Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-20 Thread Michi Henning
Below is the source code for retrieving the list of all known scopes. Note that instantiating the runtime and tearing it down is moderately expensive, so you probably want to hang onto the runtime handle for the duration. Apply whatever pattern match is appropriate to the returned strings. Given

[Touch-packages] [Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-20 Thread James Henstridge
And if you're after one single scope, you can call get_metadata() rather than list(), checking for NotFoundException. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to unity-scopes-api in Ubuntu.

[Touch-packages] [Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-19 Thread James Henstridge
Are you sure you can't click for this information? Take the Youtube scope for instance, with a scope ID of com.ubuntu.scopes.youtube_youtube. I can get the manifest for the package with: click info com.ubuntu.scopes.youtube Looking at the manifest, the hooks.youtube dict has a scope key,

Re: [Touch-packages] [Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-19 Thread Ted Gould
Yes, we could get the information from click. But, then we wouldn't get things like the scopes that are installed on the image. I think it'd be better if the scope system provided a function instead of each of the services implementing it's own opinion of what is a scope. -- You received this

Re: [Touch-packages] [Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-18 Thread Ted Gould
I feel like your two points conflict ☺ If looking for a file on the filesystem won't work, then I can't ask click for the information as if it knew there was a scope there it'd be writing a file to the filesystem. That's basically what the scope click hook does. (symbolic link, but whatevs)

[Touch-packages] [Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-18 Thread Michi Henning
Maybe we are missing each other here. I'm trying to help. I'm just pointing out that there are some potential issues we should think about. It may well be that I don't have the complete picture... When you say if a particular AppID is connected to a scope, I don't really know what you mean. All

Re: [Touch-packages] [Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-18 Thread Ted Gould
The URL dispatcher case is that it gets a URL that looks like this: scope://com.foo_bar I want to know whether to return an error on that URL because it is a scope that doesn't exist, or to pass it onto the dash. So it is really just testing that string to see if it is something that the dash

[Touch-packages] [Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-18 Thread Michi Henning
tails of click packaging, I'm concerned because the scopes runtime has no business knowing about packaging. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to unity-scopes-api in Ubuntu. https://bugs.launchpad.net/bugs/1465675

[Touch-packages] [Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-18 Thread Michi Henning
I have two concerns: - Just looking whether a file is installed somewhere isn't going to work. That's because the installation locations aren't fixed. For example, it's possible to run multiple scopes run times side-by-side on the same machine without having them interfere with each other, by

Re: [Touch-packages] [Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-16 Thread Ted Gould
On Tue, 2015-06-16 at 23:50 +, Michi Henning wrote: We currently don't have any concept of an app ID in the scopes run time, except for one place, where we check whether a scope ID looks like scope_id_app_id. That's the case for scopes that are bundled with an app into the same click.

[Touch-packages] [Bug 1465675] Re: API needed to determine if App ID is a scope

2015-06-16 Thread Michi Henning
We currently don't have any concept of an app ID in the scopes run time, except for one place, where we check whether a scope ID looks like scope_id_app_id. That's the case for scopes that are bundled with an app into the same click. Is this what you mean? The easiest way to implement this would