MeeGo Sharing Framework plugin in Harmattan
Hi
I started to create [URL="http://projects.developer.nokia.com/upload_cli"]a command line sharing plugin[/URL] for Harmattan, mainly for uploading images via scp.
I took this as a base:
[url]http://meego.gitorious.org/meego-sharing-framework/webupload-engine/trees/master/test-plugin[/url]
But I didn't find good info about how to actually install it to the device. Is it enough to put the plugin to the /usr/lib/webupload/plugins directory or do I need to also add a service file for it? Should the plugin be an executable or a library?
And how to install the plugin so that the Harmattan security framework allows executing it? I debianized it and guessed some Aegis commands to the debian/rules file and even though it didn't give any errors after some trial-and-errors, I still get denied when trying to execute it.
Thanks.
Re: MeeGo Sharing Framework plugin in Harmattan
Hi Tuomas!
[QUOTE=kulve;854479]But I didn't find good info about how to actually install it to the device. Is it enough to put the plugin to the /usr/lib/webupload/plugins directory or do I need to also add a service file for it?[/QUOTE]
Service file in /usr/share/accounts/services/ contains settings for webupload plugin, in principle it could be empty, but you then would need to set all these settings inside plugin.
[QUOTE=kulve;854479]Should the plugin be an executable or a library?[/QUOTE]
It's a library built on top of libwebupload0 library.
[QUOTE=kulve;854479]And how to install the plugin so that the Harmattan security framework allows executing it? I debianized it and guessed some Aegis commands to the debian/rules file and even though it didn't give any errors after some trial-and-errors, I still get denied when trying to execute it.[/QUOTE]
Placing binaries to Debian package should be enough, AFAIK, no need for extra Aegis credentials.
Re: MeeGo Sharing Framework plugin in Harmattan
Daniil, you are wrong here.
Webupload plugins are executables, they run as separate processes.
RM680-22-6_PR_RM680:~# readelf -h /usr/lib/webupload/plugins/facebook |grep Type
Type: EXEC (Executable file)
Here is more or less working (missing .pro files) example of real world sharing service for Dropbox: [url]http://meego.gitorious.org/meego-sharing-framework/pages/Dropbox[/url]
Re: MeeGo Sharing Framework plugin in Harmattan
I couldn't get the Aegis to approve my plugin so for now I just [URL="http://talk.maemo.org/showthread.php?p=1066889#post1066889"]disabled the whole thing[/URL]
I didn't get the plugin visible to the Accounts UI by just installing the plugin to /usr/lib/webupload/plugins/. Next I tried adding the service file to /usr/share/accounts/services but without success. But when I added a provider file to /usr/share/accounts/providers I got my plugin visible in the UI.
Now I need to add the real settings and the actual content to my plugin :)
Thanks for your help.
Re: MeeGo Sharing Framework plugin in Harmattan
How do I configure what the Account setup asks? It seems to ask for username and password by default and for me just the command line string would be enough.
Almost all of the accounts have a plugin in /usr/lib/AccountSetup/. Are those explained somewhere?
Thanks.
Re: MeeGo Sharing Framework plugin in Harmattan
Read [url]http://meego.gitorious.org/meego-sharing-framework/pages/Dropbox[/url], it is (almost) full-featured example -- it includes signon, accounts, and web-upload parts of DropBox sharing.
Re: MeeGo Sharing Framework plugin in Harmattan
The best thing of this example is Accounts/SSO part. The documentation is lacking. Please someone guide me to get a full featured accounts and SSO service could be consumable from 3rd party app. I wish the promises from here: [url]https://www.developer.nokia.com/swipe/ux/pages/Accounts.html[/url] could be realized. Thanks!
Re: MeeGo Sharing Framework plugin in Harmattan
[QUOTE=bokovoy;856712]Read [url]http://meego.gitorious.org/meego-sharing-framework/pages/Dropbox[/url], it is (almost) full-featured example -- it includes signon, accounts, and web-upload parts of DropBox sharing.[/QUOTE]
Would it be possible to actually finish that, so it would be a working example instead of "almost" working? Now it's missing some source files and the build files which makes it a bit bad example. And add the files to Git instead of cut'n'pasting them to a wiki page?
Thanks.
Re: MeeGo Sharing Framework plugin in Harmattan
Hi Tuomas,
you also probably want to have the account being configurable from the "Accounts" application. In order to do so, the first step is to create a .provider XML file, which must be installed in /usr/share/accounts/providers/. You can see the other files in that directory to understand what's the format of the file. This file is used by [URL="http://code.google.com/p/accounts-sso/source/list?repo=libaccounts-glib"]libaccounts-glib[/URL] (to get the basic informations such as provider name and icon) and [URL="http://gitorious.org/accounts-sso/libaccounts-ui"]libaccounts-ui[/URL] for the account configuration. You will also need a .service file in /usr/share/accounts/services/, which will use the new provider.
libaccounts-ui provides a set of classes to create plugins for the Accounts application, and also a binary (which IIRC is called genericplugin) which builds the configuration UI based on the elements found in the .provider and .service files. You might find that this is enough for your needs -- if it isn't, you'll have to create a plugin yourself, named /usr/lib/AccountSetup/<provider name>plugin. You can reuse classes from libaccounts-ui, and just subclass those classes whose behaviour you need to change. If you want to make a pure Qt/QML plugin (and not use libMeegoTouch) then you cannot use libaccounts-ui, but [URL="http://gitorious.org/accounts-sso/libaccountsetup"]libaccountsetup[/URL] (which only takes care of the IPC between the Accounts application and the plugin.
Unfortunately I cannot answer your other questions, as I don't know almost anything about the sharing framework.
Re: MeeGo Sharing Framework plugin in Harmattan
[QUOTE=mardy;867177]
you also probably want to have the account being configurable from the "Accounts" application.[/QUOTE]
I would think so, yes.
[QUOTE=mardy;867177] In order to do so, the first step is to create a .provider XML file, which must be installed in /usr/share/accounts/providers/. You can see the other files in that directory to understand what's the format of the file.[/QUOTE]
I have that file but I'm really unsure about the content. I've tried to mimic the other files there but the changes don't seem to have any effect in the UI.
[QUOTE=mardy;867177]You will also need a .service file in /usr/share/accounts/services/, which will use the new provider.[/QUOTE]
I have this one as well. Again with mimiced content.
[QUOTE=mardy;867177]libaccounts-ui provides a set of classes to create plugins for the Accounts application, and also a binary (which IIRC is called genericplugin) which builds the configuration UI based on the elements found in the .provider and .service files. You might find that this is enough for your needs[/QUOTE]
The generic plugin could be enough. At least I would like to get something working with that first to see how far I can get with that.
Could you provide a bit more specific instructions or pointers related to the service and provide files?
Thank you.
Re: MeeGo Sharing Framework plugin in Harmattan
Hi kulve,
I'm basically trying to find out the same stuff. I don't have anything working yet, but hope this helps a bit. This is what I've gathered this far:
- Service description: [URL="http://pastebin.com/yZjj9EKy"]/usr/share/accounts/services/footest-share.service[/URL]
- Service plugin binary: [URL="http://pastebin.com/knDsppyb"]/usr/lib/webupload/plugins/footest[/URL]
- Provider description: [URL="http://pastebin.com/1fXxaQQW"]/usr/share/accounts/providers/footest.provider[/URL]
- Auth plugin command: [URL="http://pastebin.com/J8FFMVtZ"]/usr/lib/AccountSetup/footestplugin[/URL]
- Auth plugin binary: [URL="http://pastebin.com/6aWvA6SU"]/usr/lib/AccountSetup/footestplugin/bin/footestplugin[/URL]
Both plugin dummy binaries build fine with Harmattan Platform API (note that you may need to change the SDK paths in .pro).
The provider description brings a dummy entry to the sharing accounts setup screen. Clicking it doesn't do anything -- I assume this means it's actually trying to load the dummy auth plugin since changing the auth plugin command to point to e.g. "googleplugin" shows the Google services auth ui. Furthermore, I assume that a sharing service entry would become visible after a successful authentication.
I've been trying to find this out using the existing service files and the Dropbox example skeleton. I'll continue with this when I have more time. I'll gladly accept any insights and documentation!
Edit: Reading your message second time, I guess you already had all this figured out. Hope this helps someone anyway!
Re: MeeGo Sharing Framework plugin in Harmattan
[QUOTE=kulve;867131]Would it be possible to actually finish that, so it would be a working example instead of "almost" working? Now it's missing some source files and the build files which makes it a bit bad example. And add the files to Git instead of cut'n'pasting them to a wiki page?
Thanks.[/QUOTE]
You may ask about that developers directly on gitorious by sending a message to active sharing framework developers: [url]http://meego.gitorious.org/meego-sharing-framework/[/url] -- press on the name and on a developer's page you'll find "send message" button.
Re: MeeGo Sharing Framework plugin in Harmattan
Has anyone been able to get an auth plugin to load? I'm encountering errors "Booster: Loading invoked application failed: '/usr/lib/AccountSetup/bin/footestplugin: undefined symbol: _ZTI19AuthPluginInterface'".
I'm linking against libs "signon-qt" and "signon-plugins", should there be something in addition to these?
Re: MeeGo Sharing Framework plugin in Harmattan
To answer myself: the auth plugin is supposed to go to /usr/lib/signon/libfootestplugin.so, not to /usr/lib/AccountSetup. The account setup UI loads fine when the plugin is in its correct location.
Re: MeeGo Sharing Framework plugin in Harmattan
Hi aspoikel,
So, did you manage to get this thing working in your project? Have you published your source code somewhere?
Thanks.