Re: [E-devel] exchange library is growing

2008-08-22 Thread Toma
Great work Massimiliano! :)

Toma

2008/8/23 Massimiliano Calamelli <[EMAIL PROTECTED]>:
> Hi all, i'm very happy to say that exchange library is now a little usable.
> For those who don't know what is exchange, this library is the client
> side of exchange.enlightenment.org , providing a set of API to
> interact with the server.
>
> This library now provide:
> * a CLI interface (exchange_cli), for shell scripting
> * a set of API, for new applications
>
> Here's a cut&paste for the CLI:
>
> [EMAIL PROTECTED]:~$ exchange_cli
> Usage:
>  exchange_cli -local_theme_name 
>  exchange_cli -local_theme_author 
>  exchange_cli -local_theme_version 
>  exchange_cli -local_theme_license 
>  exchange_cli -local_theme_check_update 
>  exchange_cli -remote_theme_id 
>  exchange_cli -remote_theme_author 
>  exchange_cli -remote_theme_license 
>  exchange_cli -remote_theme_version 
>  exchange_cli -remote_theme_description 
>  exchange_cli -remote_theme_url 
>  exchange_cli -remote_theme_thumbmnail 
>  exchange_cli -remote_theme_screenshot 
>  exchange_cli -remote_theme_user_id 
>  exchange_cli -remote_theme_created_at 
>  exchange_cli -remote_theme_updated_at 
> [EMAIL PROTECTED]:~$
>
> Here's a cut&paste for the API:
>
> // startup/shutdown functions
> EAPI int  exchange_init(void);
> EAPI int  exchange_shutdown(void);
>
> // local themes functions
> EAPI char *exchange_local_theme_name_get(const char *file);
> EAPI char *exchange_local_theme_author_get(const char *file);
> EAPI char *exchange_local_theme_license_get(const char *file);
> EAPI char *exchange_local_theme_version_get(const char *file);
> EAPI int  exchange_local_theme_check_update(const char *file);
>
> // remote themes functions
> EAPI int  exchange_remote_theme_id_get(const char *theme_name);
> EAPI char *exchange_remote_theme_author_get(const char *theme_name);
> EAPI char *exchange_remote_theme_license_get(const char *theme_name);
> EAPI char *exchange_remote_theme_version_get(const char *theme_name);
> EAPI char *exchange_remote_theme_description_get(const char *theme_name);
> EAPI char *exchange_remote_theme_url_get(const char *theme_name);
> EAPI char *exchange_remote_theme_thumbnail_get(const char *theme_name);
> EAPI char *exchange_remote_theme_screenshot_get(const char *theme_name);
> EAPI int  exchange_remote_theme_user_id_get(const char *theme_name);
> EAPI char *exchange_remote_theme_created_get(const char *theme_name);
> EAPI char *exchange_remote_theme_updated_get(const char *theme_name);
>
> I know that there's a lot of work that must be done to complete the
> library, but it is usable, uses autofoo, builds without error and
> seems (my tests) don't have leaks or segv.
> Atm the best use is to check for updates for a theme by the CLI (real 
> example):
>
> [EMAIL PROTECTED]:~$ exchange_cli -remote_theme_version Cerium
> Theme: Cerium, version: 1.1
> [EMAIL PROTECTED]:~$ exchange_cli -local_theme_version 
> ~/.e/e/themes/cerium.edj
> Theme: /home/massi/.e/e/themes/cerium.edj, version: 1.0
> [EMAIL PROTECTED]:~$ exchange_cli -local_theme_check_update 
> ~/.e/e/themes/cerium.edj
> Theme: /home/massi/.e/e/themes/cerium.edj, update available: YES!
>
> Next steps:
> * creating a new function that returns a list of all data related to
> remote theme
> * complete, for local theme, same work on remote theme (get all data
> one by one / list)
> * add Doxy
> * then follow the guidelines indicated in a thread on e-devel
>
> The code can be found here:
> http://staff.get-e.org/?p=users/mcalamelli/exchange.git;a=summary
>
> Here's the feed, to get updates (i'll mail on lists ony for VERY big changes):
> RSS -> http://staff.get-e.org/?p=users/mcalamelli/exchange.git;a=rss
> ATOM -> http://staff.get-e.org/?p=users/mcalamelli/exchange.git;a=atom
>
> Feel free to test, use and abuse, and maybe merge in proto... :)
>
> Ciao
>
> Massimiliano
>
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] exchange library is growing

2008-08-22 Thread Massimiliano Calamelli
2008/8/23 Gustavo Sverzut Barbieri <[EMAIL PROTECTED]>:
> On Fri, Aug 22, 2008 at 7:05 PM, Massimiliano Calamelli
> <[EMAIL PROTECTED]> wrote:
>> 2008/8/22 Gustavo Sverzut Barbieri <[EMAIL PROTECTED]>:
>>>
>>> Looks good, but I'd use getopt and different parameters, something like 
>>> this:
>>>
>>> exchange_cli --theme=theme --request=author
>>> or: excahgen_cli --request=author theme/target
>>>
>>> making --request lookup the parameter inside a list of actions, this
>>> will make easier to extend.
>>>
>>
>> Good point, i like getopt, i keep in mind.
>
> getopt_long is easy to use, man page provides good examples.
>
>

I'll check asap.

>
> yes!
>

Changes in git!

>> Thanks for your reply
>
> thank you for your work and code.
>

:)

> --
> Gustavo Sverzut Barbieri
> http://profusion.mobi embedded systems
> --
> MSN: [EMAIL PROTECTED]
> Skype: gsbarbieri
> Mobile: +55 (19) 9225-2202
>

Massimiliano

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] exchange library is growing

2008-08-22 Thread Gustavo Sverzut Barbieri
On Fri, Aug 22, 2008 at 7:05 PM, Massimiliano Calamelli
<[EMAIL PROTECTED]> wrote:
> 2008/8/22 Gustavo Sverzut Barbieri <[EMAIL PROTECTED]>:
>>
>> Looks good, but I'd use getopt and different parameters, something like this:
>>
>> exchange_cli --theme=theme --request=author
>> or: excahgen_cli --request=author theme/target
>>
>> making --request lookup the parameter inside a list of actions, this
>> will make easier to extend.
>>
>
> Good point, i like getopt, i keep in mind.

getopt_long is easy to use, man page provides good examples.


>>> Here's a cut&paste for the API:
>> ...
>>> EAPI char *exchange_remote_theme_thumbnail_get(const char *theme_name);
>>> EAPI char *exchange_remote_theme_screenshot_get(const char *theme_name);
>>
>> does screenshot and thumbnail download the file or no?
>
> No, only provides the URL.
> I've to create separate functions for downloads.
> Hmmm, looking at function names, it isn't clear. Good question :)
> Better to rename in:
> EAPI char *exchange_remote_theme_thumbnail_url_get(const char *theme_name);
> EAPI char *exchange_remote_theme_screenshot_url_get(const char *theme_name);
>
> Sounds good?

yes!


> Thanks for your reply

thank you for your work and code.


-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] exchange library is growing

2008-08-22 Thread Massimiliano Calamelli
2008/8/22 Gustavo Sverzut Barbieri <[EMAIL PROTECTED]>:
>
> Looks good, but I'd use getopt and different parameters, something like this:
>
> exchange_cli --theme=theme --request=author
> or: excahgen_cli --request=author theme/target
>
> making --request lookup the parameter inside a list of actions, this
> will make easier to extend.
>

Good point, i like getopt, i keep in mind.

>> Here's a cut&paste for the API:
> ...
>> EAPI char *exchange_remote_theme_thumbnail_get(const char *theme_name);
>> EAPI char *exchange_remote_theme_screenshot_get(const char *theme_name);
>
> does screenshot and thumbnail download the file or no?

No, only provides the URL.
I've to create separate functions for downloads.
Hmmm, looking at function names, it isn't clear. Good question :)
Better to rename in:
EAPI char *exchange_remote_theme_thumbnail_url_get(const char *theme_name);
EAPI char *exchange_remote_theme_screenshot_url_get(const char *theme_name);

Sounds good?
Thanks for your reply

Massimiliano

> Gustavo Sverzut Barbieri
> http://profusion.mobi embedded systems
> --
> MSN: [EMAIL PROTECTED]
> Skype: gsbarbieri
> Mobile: +55 (19) 9225-2202
>

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] exchange library is growing

2008-08-22 Thread Gustavo Sverzut Barbieri
On Fri, Aug 22, 2008 at 6:14 PM, Massimiliano Calamelli
<[EMAIL PROTECTED]> wrote:
> Hi all, i'm very happy to say that exchange library is now a little usable.
> For those who don't know what is exchange, this library is the client
> side of exchange.enlightenment.org , providing a set of API to
> interact with the server.
>
> This library now provide:
> * a CLI interface (exchange_cli), for shell scripting
> * a set of API, for new applications
>
> Here's a cut&paste for the CLI:
>
> [EMAIL PROTECTED]:~$ exchange_cli
> Usage:
>  exchange_cli -local_theme_name 
>  exchange_cli -local_theme_author 
>  exchange_cli -local_theme_version 
>  exchange_cli -local_theme_license 
>  exchange_cli -local_theme_check_update 
>  exchange_cli -remote_theme_id 
>  exchange_cli -remote_theme_author 
>  exchange_cli -remote_theme_license 
>  exchange_cli -remote_theme_version 
>  exchange_cli -remote_theme_description 
>  exchange_cli -remote_theme_url 
>  exchange_cli -remote_theme_thumbmnail 
>  exchange_cli -remote_theme_screenshot 
>  exchange_cli -remote_theme_user_id 
>  exchange_cli -remote_theme_created_at 
>  exchange_cli -remote_theme_updated_at 
> [EMAIL PROTECTED]:~$

Looks good, but I'd use getopt and different parameters, something like this:

 exchange_cli --theme=theme --request=author
or: excahgen_cli --request=author theme/target

making --request lookup the parameter inside a list of actions, this
will make easier to extend.


> Here's a cut&paste for the API:
...
> EAPI char *exchange_remote_theme_thumbnail_get(const char *theme_name);
> EAPI char *exchange_remote_theme_screenshot_get(const char *theme_name);

does screenshot and thumbnail download the file or no?

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] exchange library is growing

2008-08-22 Thread Veli Ogla Sungutay
nicely done! Thanks

On Sat, Aug 23, 2008 at 12:14 AM, Massimiliano Calamelli <
[EMAIL PROTECTED]> wrote:

> Hi all, i'm very happy to say that exchange library is now a little usable.
> For those who don't know what is exchange, this library is the client
> side of exchange.enlightenment.org , providing a set of API to
> interact with the server.
>
> This library now provide:
> * a CLI interface (exchange_cli), for shell scripting
> * a set of API, for new applications
>
> Here's a cut&paste for the CLI:
>
> [EMAIL PROTECTED]:~$ exchange_cli
> Usage:
>  exchange_cli -local_theme_name 
>  exchange_cli -local_theme_author 
>  exchange_cli -local_theme_version 
>  exchange_cli -local_theme_license 
>  exchange_cli -local_theme_check_update 
>  exchange_cli -remote_theme_id 
>  exchange_cli -remote_theme_author 
>  exchange_cli -remote_theme_license 
>  exchange_cli -remote_theme_version 
>  exchange_cli -remote_theme_description 
>  exchange_cli -remote_theme_url 
>  exchange_cli -remote_theme_thumbmnail 
>  exchange_cli -remote_theme_screenshot 
>  exchange_cli -remote_theme_user_id 
>  exchange_cli -remote_theme_created_at 
>  exchange_cli -remote_theme_updated_at 
> [EMAIL PROTECTED]:~$
>
> Here's a cut&paste for the API:
>
> // startup/shutdown functions
> EAPI int  exchange_init(void);
> EAPI int  exchange_shutdown(void);
>
> // local themes functions
> EAPI char *exchange_local_theme_name_get(const char *file);
> EAPI char *exchange_local_theme_author_get(const char *file);
> EAPI char *exchange_local_theme_license_get(const char *file);
> EAPI char *exchange_local_theme_version_get(const char *file);
> EAPI int  exchange_local_theme_check_update(const char *file);
>
> // remote themes functions
> EAPI int  exchange_remote_theme_id_get(const char *theme_name);
> EAPI char *exchange_remote_theme_author_get(const char *theme_name);
> EAPI char *exchange_remote_theme_license_get(const char *theme_name);
> EAPI char *exchange_remote_theme_version_get(const char *theme_name);
> EAPI char *exchange_remote_theme_description_get(const char *theme_name);
> EAPI char *exchange_remote_theme_url_get(const char *theme_name);
> EAPI char *exchange_remote_theme_thumbnail_get(const char *theme_name);
> EAPI char *exchange_remote_theme_screenshot_get(const char *theme_name);
> EAPI int  exchange_remote_theme_user_id_get(const char *theme_name);
> EAPI char *exchange_remote_theme_created_get(const char *theme_name);
> EAPI char *exchange_remote_theme_updated_get(const char *theme_name);
>
> I know that there's a lot of work that must be done to complete the
> library, but it is usable, uses autofoo, builds without error and
> seems (my tests) don't have leaks or segv.
> Atm the best use is to check for updates for a theme by the CLI (real
> example):
>
> [EMAIL PROTECTED]:~$ exchange_cli -remote_theme_version Cerium
> Theme: Cerium, version: 1.1
> [EMAIL PROTECTED]:~$ exchange_cli -local_theme_version 
> ~/.e/e/themes/cerium.edj
> Theme: /home/massi/.e/e/themes/cerium.edj, version: 1.0
> [EMAIL PROTECTED]:~$ exchange_cli -local_theme_check_update
> ~/.e/e/themes/cerium.edj
> Theme: /home/massi/.e/e/themes/cerium.edj, update available: YES!
>
> Next steps:
> * creating a new function that returns a list of all data related to
> remote theme
> * complete, for local theme, same work on remote theme (get all data
> one by one / list)
> * add Doxy
> * then follow the guidelines indicated in a thread on e-devel
>
> The code can be found here:
> http://staff.get-e.org/?p=users/mcalamelli/exchange.git;a=summary
>
> Here's the feed, to get updates (i'll mail on lists ony for VERY big
> changes):
> RSS -> http://staff.get-e.org/?p=users/mcalamelli/exchange.git;a=rss
> ATOM -> http://staff.get-e.org/?p=users/mcalamelli/exchange.git;a=atom
>
> Feel free to test, use and abuse, and maybe merge in proto... :)
>
> Ciao
>
> Massimiliano
>
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>



-- 
Veli Ogla Sungutay
http://gui-rd.org
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lis