List Info

Thread: User avatar dialog in avs




User avatar dialog in avs
user name
2007-05-07 22:39:49
Hi all,

I just commited in berliOS an initial version of a user
avatar dialog
(in 'View/Change My Details...') built by avs. The idea is
to replace
the dialogs that each protocol creates by one created by
avs.

I'd like to explain here how are things working and check if
this is
fine with all proto developers. (As the last version of the
set my
avatar service didn't supported removing avatars, it
required a small
change, so some crashes may happen and some protocol changes
are
needed)

The user avatar (also know as own avatar or protocol avatar)
dialog is
built this way:

1. All protocols that define the PS_SETMYAVATAR service are
listed in the dialog
2. When the user sets an avatar for a protocol, the
following happens:
2a. If exists, PS_GETMYAVATARMAXSIZE is called in the
protocol to get
the max avatar size for the protocol. If it don't exists,
300 is used.
If the selected image is smaller than that, it will not be
resized.
(Some protocol need an option to always resize?)
2b. If exists, PS_GETMYAVATARIMAGEPROPORTION is called in
the protocol
to check if the avatar must be square. If it don't exists
the image
proportions are not changed
2c. If exists, PS_ISAVATARFORMATSUPPORTED is called in the
protocol to
check which image formats are suported. If it don't exists
any image
format can be sent to the protocol
2d. The image is resized and sent to the protocol throught
the
PS_SETMYAVATAR service. The image passed is a temporary one
and will
be deleted after the return of the call
3. When the user deletes an avatar the service
PS_SETMYAVATAR is
called, passing NULL as image file (this is a new behaviour
of this
service)


The notification that the avatar has changed is get from one
of the following:
- a MS_AV_REPORTMYAVATARCHANGED service call
- The setting AvatarFile or PictObject or AvatarHash of the
protocol is changed


There are some things still missing:
- Support for XML files in ICQ (or any protocol that reports
support
of xml/swf images)
- Use the original image selected by the user if no resize
is needed
(actually the image is always saved to disk, what isn't
really needed
and can cause problems with transparency)
- Option to use one avatar to all protocols


Well, that's all, folks.
Pescuma




PS: A more descriptive info of the above services:

/*
wParam=0
lParam=(const char *)Avatar file name or NULL to remove the
avatar
return=0 for sucess
*/
#define PS_SETMYAVATAR "/SetMyAvatar"

/*
wParam=(char *)Buffer to file name
lParam=(int)Buffer size
return=0 for sucess
*/
#define PS_GETMYAVATAR "/GetMyAvatar"

/*
wParam=(int *)max width of avatar - will be set (-1 for no
max)
lParam=(int *)max height of avatar - will be set (-1 for no
max)
return=0 for sucess
*/
#define PS_GETMYAVATARMAXSIZE
"/GetMyAvatarMaxSize"

/*
wParam=0
lParam=0
return=One of PIP_SQUARE, PIP_FREEPROPORTIONS
*/
#define PIP_FREEPROPORTIONS	0
#define PIP_SQUARE			1
#define PS_GETMYAVATARIMAGEPROPORTION
"/GetMyAvatarImageProportion"

/*
wParam = 0
lParam = PA_FORMAT_*   // avatar format
return = 1 (supported) or 0 (not supported)
*/
#define PS_ISAVATARFORMATSUPPORTED
"/IsAvatarFormatSupported"



PS 2: Could someone please add this funcion near the
CallProtoService one?
// See if a protocol service exists
__inline static int ProtoServiceExists(const char
*szModule,const char
*szService)
{
	char str[MAXMODULELABELLENGTH * 2];
	strcpy(str,szModule);
	strcat(str,szService);
	return ServiceExists(str);
}

------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Miranda-Develop mailing list
Miranda-Developlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/miranda
-develop

Re: User avatar dialog in avs
country flaguser name
United States
2007-05-07 23:40:10
Pescuma,

I have few questions and proposal. 

1. Why are we having service for every avatar parameter?
Maximum, size,
proportion, formats supported, etc. 
It seems like endless number of services in future. Why not
to create one
service like PS_GETAVATARCAPS and replace all these servives
with it.
The service would return a structure with all this stuff and
maybe more in
future.

2. Could you please move all these PS_*AVATAR* definitions
into m_avatar.h
Currently every protocol defines it's own set of these
defitions and it
would be nice to get rid of them and move to the common
location.

-----Original Message-----
From: miranda-develop-bounceslists.sourceforge.net
[mailto:miranda-develop-bounceslists.sourceforge.net] On
Behalf Of Ricardo
Pescuma Domenecci
Sent: Monday, May 07, 2007 10:40 PM
To: miranda-developlists.sourceforge.net
Subject: [Miranda-Develop] User avatar dialog in avs

Hi all,

I just commited in berliOS an initial version of a user
avatar dialog (in
'View/Change My Details...') built by avs. The idea is to
replace the
dialogs that each protocol creates by one created by avs.

I'd like to explain here how are things working and check if
this is fine
with all proto developers. (As the last version of the set
my avatar service
didn't supported removing avatars, it required a small
change, so some
crashes may happen and some protocol changes are
needed)

The user avatar (also know as own avatar or protocol avatar)
dialog is built
this way:

1. All protocols that define the PS_SETMYAVATAR service are
listed in the
dialog 2. When the user sets an avatar for a protocol, the
following
happens:
2a. If exists, PS_GETMYAVATARMAXSIZE is called in the
protocol to get the
max avatar size for the protocol. If it don't exists, 300 is
used.
If the selected image is smaller than that, it will not be
resized.
(Some protocol need an option to always resize?) 2b. If
exists,
PS_GETMYAVATARIMAGEPROPORTION is called in the protocol to
check if the
avatar must be square. If it don't exists the image
proportions are not
changed 2c. If exists, PS_ISAVATARFORMATSUPPORTED is called
in the protocol
to check which image formats are suported. If it don't
exists any image
format can be sent to the protocol 2d. The image is resized
and sent to the
protocol throught the PS_SETMYAVATAR service. The image
passed is a
temporary one and will be deleted after the return of the
call 3. When the
user deletes an avatar the service PS_SETMYAVATAR is called,
passing NULL as
image file (this is a new behaviour of this
service)


The notification that the avatar has changed is get from one
of the
following:
- a MS_AV_REPORTMYAVATARCHANGED service call
- The setting AvatarFile or PictObject or AvatarHash of the
protocol is
changed


There are some things still missing:
- Support for XML files in ICQ (or any protocol that reports
support of
xml/swf images)
- Use the original image selected by the user if no resize
is needed
(actually the image is always saved to disk, what isn't
really needed and
can cause problems with transparency)
- Option to use one avatar to all protocols


Well, that's all, folks.
Pescuma




PS: A more descriptive info of the above services:

/*
wParam=0
lParam=(const char *)Avatar file name or NULL to remove the
avatar return=0
for sucess */ #define PS_SETMYAVATAR
"/SetMyAvatar"

/*
wParam=(char *)Buffer to file name
lParam=(int)Buffer size
return=0 for sucess
*/
#define PS_GETMYAVATAR "/GetMyAvatar"

/*
wParam=(int *)max width of avatar - will be set (-1 for no
max) lParam=(int
*)max height of avatar - will be set (-1 for no max)
return=0 for sucess */
#define PS_GETMYAVATARMAXSIZE
"/GetMyAvatarMaxSize"

/*
wParam=0
lParam=0
return=One of PIP_SQUARE, PIP_FREEPROPORTIONS */
#define PIP_FREEPROPORTIONS	0
#define PIP_SQUARE			1
#define PS_GETMYAVATARIMAGEPROPORTION
"/GetMyAvatarImageProportion"

/*
wParam = 0
lParam = PA_FORMAT_*   // avatar format
return = 1 (supported) or 0 (not supported) */ #define
PS_ISAVATARFORMATSUPPORTED
"/IsAvatarFormatSupported"



PS 2: Could someone please add this funcion near the
CallProtoService one?
// See if a protocol service exists
__inline static int ProtoServiceExists(const char
*szModule,const char
*szService)
{
	char str[MAXMODULELABELLENGTH * 2];
	strcpy(str,szModule);
	strcat(str,szService);
	return ServiceExists(str);
}

------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express Download DB2
Express C - the
FREE version of DB2 express and take control of your XML. No
limits. Just
data. Click to get it now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Miranda-Develop mailing list
Miranda-Developlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/miranda
-develop


------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Miranda-Develop mailing list
Miranda-Developlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/miranda
-develop

Re: User avatar dialog in avs
country flaguser name
Russian Federation
2007-05-08 03:06:53
   Hello, Ricardo!
   Tue, 8 May 2007 00:39:49 -0300 you wrote:

RPD> I just commited in berliOS an initial version of a
user avatar dialog
RPD> (in 'View/Change My Details...') built by avs. The
idea is to replace
RPD> the dialogs that each protocol creates by one
created by avs.

What about moving it to the main repository, if AVS becomes
the essential 
dependency of all Miranda's plugins?

RPD> 2a. If exists, PS_GETMYAVATARMAXSIZE is called in
the protocol to get
RPD> the max avatar size for the protocol. If it don't
exists, 300 is used.
RPD> If the selected image is smaller than that, it will
not be resized.

Maybe we'll finally have the PS_GETAVATARCAPS service, which
will take the 
first integer argument as a switch? And the second arg as a
RECT*, POINT* 
etc. It's a bit boring to have so many services for
nothing.

-- 
WMBR, George Hazan (ghazanpostman.ru) 



------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Miranda-Develop mailing list
Miranda-Developlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/miranda
-develop

Re: User avatar dialog in avs
country flaguser name
Czech Republic
2007-05-08 05:19:46
Hello,
I have some comments:
1) ICQ protocol is ready - it already handles all the
"new" stuff (used 
internaly)
2) The idea for one service PS_GETAVATARCAPS is nice and I
like it
3) For better handling I think something like AF_ENABLED
should be defined 
if it is really possible to set own avatar (the support can
be disabled and 
I do not like the idea of destroying a service to remove
protocol from AVS 
list).

So the definition can be something like:

#define AF_MAXSIZE 1
// lParam = (POINT*)maxSize
// return 0 for success
#define AF_PROPORTION 2
// lParam = 0
// return same as current PS_GETMYAVATARIMAGEPROPORTION
#define AF_FORMATSUPPORTED 3
// lParam = PA_FORMAT_*   // avatar format
// return = 1 (supported) or 0 (not supported)
#define AF_ENABLED 4
// lParam = 0
// return = 1 (avatars ready) or 0 (disabled)
/*
wParam=One of AF_*
lParam=See descr of each AF_*
#define PS_GETAVATARCAPS "/GetAvatarCaps"

Regards,
Joe 
Whale

----- Original Message ----- 
From: "Ricardo Pescuma Domenecci"
<pescuma+mirandagmail.com>
To: <miranda-developlists.sourceforge.net>
Sent: Tuesday, May 08, 2007 5:39 AM
Subject: [Miranda-Develop] User avatar dialog in avs


> Hi all,
>
> I just commited in berliOS an initial version of a user
avatar dialog
> (in 'View/Change My Details...') built by avs. The idea
is to replace
> the dialogs that each protocol creates by one created
by avs.
>
> I'd like to explain here how are things working and
check if this is
> fine with all proto developers. (As the last version of
the set my
> avatar service didn't supported removing avatars, it
required a small
> change, so some crashes may happen and some protocol
changes are
> needed)
>
> The user avatar (also know as own avatar or protocol
avatar) dialog is
> built this way:
>
> 1. All protocols that define the PS_SETMYAVATAR service
are listed in the 
> dialog
> 2. When the user sets an avatar for a protocol, the
following happens:
> 2a. If exists, PS_GETMYAVATARMAXSIZE is called in the
protocol to get
> the max avatar size for the protocol. If it don't
exists, 300 is used.
> If the selected image is smaller than that, it will not
be resized.
> (Some protocol need an option to always resize?)
> 2b. If exists, PS_GETMYAVATARIMAGEPROPORTION is called
in the protocol
> to check if the avatar must be square. If it don't
exists the image
> proportions are not changed
> 2c. If exists, PS_ISAVATARFORMATSUPPORTED is called in
the protocol to
> check which image formats are suported. If it don't
exists any image
> format can be sent to the protocol
> 2d. The image is resized and sent to the protocol
throught the
> PS_SETMYAVATAR service. The image passed is a temporary
one and will
> be deleted after the return of the call
> 3. When the user deletes an avatar the service
PS_SETMYAVATAR is
> called, passing NULL as image file (this is a new
behaviour of this
> service)
>
>
> The notification that the avatar has changed is get
from one of the 
> following:
> - a MS_AV_REPORTMYAVATARCHANGED service call
> - The setting AvatarFile or PictObject or AvatarHash of
the protocol is 
> changed
>
>
> There are some things still missing:
> - Support for XML files in ICQ (or any protocol that
reports support
> of xml/swf images)
> - Use the original image selected by the user if no
resize is needed
> (actually the image is always saved to disk, what isn't
really needed
> and can cause problems with transparency)
> - Option to use one avatar to all protocols
>
>
> Well, that's all, folks.
> Pescuma
>
>
>
>
> PS: A more descriptive info of the above services:
>
> /*
> wParam=0
> lParam=(const char *)Avatar file name or NULL to remove
the avatar
> return=0 for sucess
> */
> #define PS_SETMYAVATAR "/SetMyAvatar"
>
> /*
> wParam=(char *)Buffer to file name
> lParam=(int)Buffer size
> return=0 for sucess
> */
> #define PS_GETMYAVATAR "/GetMyAvatar"
>
> /*
> wParam=(int *)max width of avatar - will be set (-1 for
no max)
> lParam=(int *)max height of avatar - will be set (-1
for no max)
> return=0 for sucess
> */
> #define PS_GETMYAVATARMAXSIZE
"/GetMyAvatarMaxSize"
>
> /*
> wParam=0
> lParam=0
> return=One of PIP_SQUARE, PIP_FREEPROPORTIONS
> */
> #define PIP_FREEPROPORTIONS 0
> #define PIP_SQUARE 1
> #define PS_GETMYAVATARIMAGEPROPORTION
"/GetMyAvatarImageProportion"
>
> /*
> wParam = 0
> lParam = PA_FORMAT_*   // avatar format
> return = 1 (supported) or 0 (not supported)
> */
> #define PS_ISAVATARFORMATSUPPORTED
"/IsAvatarFormatSupported"
>
>
>
> PS 2: Could someone please add this funcion near the
CallProtoService one?
> // See if a protocol service exists
> __inline static int ProtoServiceExists(const char
*szModule,const char
> *szService)
> {
> char str[MAXMODULELABELLENGTH * 2];
> strcpy(str,szModule);
> strcat(str,szService);
> return ServiceExists(str);
> }
>
>
------------------------------------------------------------
-------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2
express and take
> control of your XML. No limits. Just data. Click to get
it now.
> http://sourcefor
ge.net/powerbar/db2/
> _______________________________________________
> Miranda-Develop mailing list
> Miranda-Developlists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/miranda
-develop 


------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Miranda-Develop mailing list
Miranda-Developlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/miranda
-develop

Re: User avatar dialog in avs
user name
2007-05-08 21:05:02
Ok, support for get caps service is done and commited. Also,
I added
the services in m_avatars.h. I didn't removed support for
old services
yet, but get caps one has priority.

For protocols that have a checkbox to enable avatars, i
think it would
be a good idea to uncheck and disable that in case avs is
not
installed.


Pescuma


On 5/8/07, Josef Kucera <jokusoftwaregmail.com> wrote:
> Hello,
> I have some comments:
> 1) ICQ protocol is ready - it already handles all the
"new" stuff (used
> internaly)
> 2) The idea for one service PS_GETAVATARCAPS is nice
and I like it
> 3) For better handling I think something like
AF_ENABLED should be defined
> if it is really possible to set own avatar (the support
can be disabled and
> I do not like the idea of destroying a service to
remove protocol from AVS
> list).
>
> So the definition can be something like:
>
> #define AF_MAXSIZE 1
> // lParam = (POINT*)maxSize
> // return 0 for success
> #define AF_PROPORTION 2
> // lParam = 0
> // return same as current
PS_GETMYAVATARIMAGEPROPORTION
> #define AF_FORMATSUPPORTED 3
> // lParam = PA_FORMAT_*   // avatar format
> // return = 1 (supported) or 0 (not supported)
> #define AF_ENABLED 4
> // lParam = 0
> // return = 1 (avatars ready) or 0 (disabled)
> /*
> wParam=One of AF_*
> lParam=See descr of each AF_*
> #define PS_GETAVATARCAPS "/GetAvatarCaps"
>
> Regards,
> Joe  Whale
>
> ----- Original Message -----
> From: "Ricardo Pescuma Domenecci"
<pescuma+mirandagmail.com>
> To: <miranda-developlists.sourceforge.net>
> Sent: Tuesday, May 08, 2007 5:39 AM
> Subject: [Miranda-Develop] User avatar dialog in avs
>
>
> > Hi all,
> >
> > I just commited in berliOS an initial version of a
user avatar dialog
> > (in 'View/Change My Details...') built by avs. The
idea is to replace
> > the dialogs that each protocol creates by one
created by avs.
> >
> > I'd like to explain here how are things working
and check if this is
> > fine with all proto developers. (As the last
version of the set my
> > avatar service didn't supported removing avatars,
it required a small
> > change, so some crashes may happen and some
protocol changes are
> > needed)
> >
> > The user avatar (also know as own avatar or
protocol avatar) dialog is
> > built this way:
> >
> > 1. All protocols that define the PS_SETMYAVATAR
service are listed in the
> > dialog
> > 2. When the user sets an avatar for a protocol,
the following happens:
> > 2a. If exists, PS_GETMYAVATARMAXSIZE is called in
the protocol to get
> > the max avatar size for the protocol. If it don't
exists, 300 is used.
> > If the selected image is smaller than that, it
will not be resized.
> > (Some protocol need an option to always resize?)
> > 2b. If exists, PS_GETMYAVATARIMAGEPROPORTION is
called in the protocol
> > to check if the avatar must be square. If it don't
exists the image
> > proportions are not changed
> > 2c. If exists, PS_ISAVATARFORMATSUPPORTED is
called in the protocol to
> > check which image formats are suported. If it
don't exists any image
> > format can be sent to the protocol
> > 2d. The image is resized and sent to the protocol
throught the
> > PS_SETMYAVATAR service. The image passed is a
temporary one and will
> > be deleted after the return of the call
> > 3. When the user deletes an avatar the service
PS_SETMYAVATAR is
> > called, passing NULL as image file (this is a new
behaviour of this
> > service)
> >
> >
> > The notification that the avatar has changed is
get from one of the
> > following:
> > - a MS_AV_REPORTMYAVATARCHANGED service call
> > - The setting AvatarFile or PictObject or
AvatarHash of the protocol is
> > changed
> >
> >
> > There are some things still missing:
> > - Support for XML files in ICQ (or any protocol
that reports support
> > of xml/swf images)
> > - Use the original image selected by the user if
no resize is needed
> > (actually the image is always saved to disk, what
isn't really needed
> > and can cause problems with transparency)
> > - Option to use one avatar to all protocols
> >
> >
> > Well, that's all, folks.
> > Pescuma
> >
> >
> >
> >
> > PS: A more descriptive info of the above
services:
> >
> > /*
> > wParam=0
> > lParam=(const char *)Avatar file name or NULL to
remove the avatar
> > return=0 for sucess
> > */
> > #define PS_SETMYAVATAR "/SetMyAvatar"
> >
> > /*
> > wParam=(char *)Buffer to file name
> > lParam=(int)Buffer size
> > return=0 for sucess
> > */
> > #define PS_GETMYAVATAR "/GetMyAvatar"
> >
> > /*
> > wParam=(int *)max width of avatar - will be set
(-1 for no max)
> > lParam=(int *)max height of avatar - will be set
(-1 for no max)
> > return=0 for sucess
> > */
> > #define PS_GETMYAVATARMAXSIZE
"/GetMyAvatarMaxSize"
> >
> > /*
> > wParam=0
> > lParam=0
> > return=One of PIP_SQUARE, PIP_FREEPROPORTIONS
> > */
> > #define PIP_FREEPROPORTIONS 0
> > #define PIP_SQUARE 1
> > #define PS_GETMYAVATARIMAGEPROPORTION
"/GetMyAvatarImageProportion"
> >
> > /*
> > wParam = 0
> > lParam = PA_FORMAT_*   // avatar format
> > return = 1 (supported) or 0 (not supported)
> > */
> > #define PS_ISAVATARFORMATSUPPORTED
"/IsAvatarFormatSupported"
> >
> >
> >
> > PS 2: Could someone please add this funcion near
the CallProtoService one?
> > // See if a protocol service exists
> > __inline static int ProtoServiceExists(const char
*szModule,const char
> > *szService)
> > {
> > char str[MAXMODULELABELLENGTH * 2];
> > strcpy(str,szModule);
> > strcat(str,szService);
> > return ServiceExists(str);
> > }
> >
> >
------------------------------------------------------------
-------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2
express and take
> > control of your XML. No limits. Just data. Click
to get it now.
> > http://sourcefor
ge.net/powerbar/db2/
> > _______________________________________________
> > Miranda-Develop mailing list
> > Miranda-Developlists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/miranda
-develop
>
>
>
------------------------------------------------------------
-------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2
express and take
> control of your XML. No limits. Just data. Click to get
it now.
> http://sourcefor
ge.net/powerbar/db2/
> _______________________________________________
> Miranda-Develop mailing list
> Miranda-Developlists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/miranda
-develop
>

------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Miranda-Develop mailing list
Miranda-Developlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/miranda
-develop

Re: User avatar dialog in avs
country flaguser name
Russian Federation
2007-05-10 03:01:07
   Hello, Ricardo!
   Thu, 10 May 2007 01:06:42 -0300 you wrote:

RPD> Just added support for XML and SWF files and made it
use original
RPD> image if possible. While doing that, I noticied 2
strange things:
RPD> - Jabber says that it accepts xml and swf as image
formats. Is this
RPD> correct?

virtually Jabber supports any kind of picture.. but maybe I
should limit the 
avatar type to known picture types.

-- 
WMBR, George Hazan (ghazanpostman.ru) 



------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Miranda-Develop mailing list
Miranda-Developlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/miranda
-develop

Re: User avatar dialog in avs
country flaguser name
Czech Republic
2007-05-10 01:17:52
Yes, yesterday I discovered, that ICQ servers accept images
up to 128x128... 
so I changed the limits...

Joe 
Whale

----- Original Message ----- 
From: "Ricardo Pescuma Domenecci"
<pescuma+mirandagmail.com>
To: <miranda-developlists.sourceforge.net>
Sent: Thursday, May 10, 2007 6:06 AM
Subject: Re: [Miranda-Develop] User avatar dialog in avs


> Just added support for XML and SWF files and made it
use original
> image if possible. While doing that, I noticied 2
strange things:
> - Jabber says that it accepts xml and swf as image
formats. Is this 
> correct?
> - New version of ICQ says image size is 128x128. Aint
that 64x64?
>
>
> Pescuma
>
>
> On 5/9/07, Josef Kucera <jokusoftwaregmail.com> wrote:
>> Excellent work,
>> I have just added support for this to ICQ and
removed the old services.
>> Seems to be working quite fine.
>>
>> Regards,
>> Joe  Whale
>> ----- Original Message -----
>> From: "Ricardo Pescuma Domenecci"
<pescuma+mirandagmail.com>
>> To: <miranda-developlists.sourceforge.net>
>> Sent: Wednesday, May 09, 2007 4:05 AM
>> Subject: Re: [Miranda-Develop] User avatar dialog
in avs
>>
>>
>> > Ok, support for get caps service is done and
commited. Also, I added
>> > the services in m_avatars.h. I didn't removed
support for old services
>> > yet, but get caps one has priority.
>> >
>> > For protocols that have a checkbox to enable
avatars, i think it would
>> > be a good idea to uncheck and disable that in
case avs is not
>> > installed.
>> >
>> >
>> > Pescuma
>> >
>> >
>>
>>
>>
------------------------------------------------------------
-------------
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2
express and take
>> control of your XML. No limits. Just data. Click to
get it now.
>> http://sourcefor
ge.net/powerbar/db2/
>> _______________________________________________
>> Miranda-Develop mailing list
>> Miranda-Developlists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/miranda
-develop
>>
>
>
------------------------------------------------------------
-------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2
express and take
> control of your XML. No limits. Just data. Click to get
it now.
> http://sourcefor
ge.net/powerbar/db2/
> _______________________________________________
> Miranda-Develop mailing list
> Miranda-Developlists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/miranda
-develop 


------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Miranda-Develop mailing list
Miranda-Developlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/miranda
-develop

Re: User avatar dialog in avs
country flaguser name
Czech Republic
2007-05-09 14:55:08
Excellent work,
I have just added support for this to ICQ and removed the
old services. 
Seems to be working quite fine.

Regards,
Joe 
Whale
----- Original Message ----- 
From: "Ricardo Pescuma Domenecci"
<pescuma+mirandagmail.com>
To: <miranda-developlists.sourceforge.net>
Sent: Wednesday, May 09, 2007 4:05 AM
Subject: Re: [Miranda-Develop] User avatar dialog in avs


> Ok, support for get caps service is done and commited.
Also, I added
> the services in m_avatars.h. I didn't removed support
for old services
> yet, but get caps one has priority.
>
> For protocols that have a checkbox to enable avatars, i
think it would
> be a good idea to uncheck and disable that in case avs
is not
> installed.
>
>
> Pescuma
>
>


------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Miranda-Develop mailing list
Miranda-Developlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/miranda
-develop

Re: User avatar dialog in avs
user name
2007-05-09 23:06:42
Just added support for XML and SWF files and made it use
original
image if possible. While doing that, I noticied 2 strange
things:
- Jabber says that it accepts xml and swf as image formats.
Is this correct?
- New version of ICQ says image size is 128x128. Aint that
64x64?


Pescuma


On 5/9/07, Josef Kucera <jokusoftwaregmail.com> wrote:
> Excellent work,
> I have just added support for this to ICQ and removed
the old services.
> Seems to be working quite fine.
>
> Regards,
> Joe  Whale
> ----- Original Message -----
> From: "Ricardo Pescuma Domenecci"
<pescuma+mirandagmail.com>
> To: <miranda-developlists.sourceforge.net>
> Sent: Wednesday, May 09, 2007 4:05 AM
> Subject: Re: [Miranda-Develop] User avatar dialog in
avs
>
>
> > Ok, support for get caps service is done and
commited. Also, I added
> > the services in m_avatars.h. I didn't removed
support for old services
> > yet, but get caps one has priority.
> >
> > For protocols that have a checkbox to enable
avatars, i think it would
> > be a good idea to uncheck and disable that in case
avs is not
> > installed.
> >
> >
> > Pescuma
> >
> >
>
>
>
------------------------------------------------------------
-------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2
express and take
> control of your XML. No limits. Just data. Click to get
it now.
> http://sourcefor
ge.net/powerbar/db2/
> _______________________________________________
> Miranda-Develop mailing list
> Miranda-Developlists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/miranda
-develop
>

------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Miranda-Develop mailing list
Miranda-Developlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/miranda
-develop

Re: User avatar dialog in avs
user name
2007-06-09 00:45:51
Hi all,

Since there were some changes with the get avatar caps
service (and by
koobs request) i'm sending a new sumary of the avs own
avatar support.
All of the code bellow is copied from m_avatars.h

1. Get the avatar
/*
wParam=(char *)Buffer to file name
lParam=(int)Buffer size
return=0 for sucess
*/
#define PS_GETMYAVATAR "/GetMyAvatar"


2. Set the avatar. This service will receive the avatar as
expecified
in the PS_GETAVATARCAPS, what means that it will have the
correct size
and format.  The return value is very important when using
the global
avatar, because based on it avs knows if all protos accepted
the
global avatar. One thing that i didn't handle in avs is the
offline
status. I assume that the protocol will store the image and
set it
when going online. Is this correct?
/*
wParam=0
lParam=(const char *)Avatar file name or NULL to remove the
avatar
return=0 for sucess
*/
#define PS_SETMYAVATAR "/SetMyAvatar"


3. A new protocol service was defined. It is used to get the
protocol
"needs" for avatars:
#define PIP_NONE				0
#define PIP_SQUARE				1

// Avatar image max size
// lParam = (POINT*) maxSize (use -1 for no max)
// return 0 for success
#define AF_MAXSIZE 1

// Avatar image proportion
// lParam = 0
// return or of PIP_*
#define AF_PROPORTION 2

// Avatar format supported when setting avatars
// lParam = PA_FORMAT_*
// return = 1 (supported) or 0 (not supported)
#define AF_FORMATSUPPORTED 3

// Avatars are enabled for protocol?
// lParam = 0
// return = 1 (avatars ready) or 0 (disabled)
#define AF_ENABLED 4

// This protocol don't need delays for fetching contact
avatars
// lParam = 0
// return = 1 (don't need) or 0 (need)
#define AF_DONTNEEDDELAYS 5

// Avatar file max size
// return size in bytes (0 for no limit)
#define AF_MAXFILESIZE 6


/*
Query avatar caps for a protocol
wParam = One of AF_*
lParam = See descr of each AF_*
*/
#define PS_GETAVATARCAPS "/GetAvatarCaps"


4. The notification that the avatar has changed is get from
one of the
following:
- a MS_AV_REPORTMYAVATARCHANGED service call
- The setting AvatarFile or PictObject or AvatarHash of the
protocol is changed




Pescuma



On 5/8/07, Ricardo Pescuma Domenecci <pescuma+mirandagmail.com> wrote:
> Hi all,
>
> I just commited in berliOS an initial version of a user
avatar dialog
> (in 'View/Change My Details...') built by avs. The idea
is to replace
> the dialogs that each protocol creates by one created
by avs.
>
> I'd like to explain here how are things working and
check if this is
> fine with all proto developers. (As the last version of
the set my
> avatar service didn't supported removing avatars, it
required a small
> change, so some crashes may happen and some protocol
changes are
> needed)
>
> The user avatar (also know as own avatar or protocol
avatar) dialog is
> built this way:
>
> 1. All protocols that define the PS_SETMYAVATAR service
are listed in the dialog
> 2. When the user sets an avatar for a protocol, the
following happens:
> 2a. If exists, PS_GETMYAVATARMAXSIZE is called in the
protocol to get
> the max avatar size for the protocol. If it don't
exists, 300 is used.
> If the selected image is smaller than that, it will not
be resized.
> (Some protocol need an option to always resize?)
> 2b. If exists, PS_GETMYAVATARIMAGEPROPORTION is called
in the protocol
> to check if the avatar must be square. If it don't
exists the image
> proportions are not changed
> 2c. If exists, PS_ISAVATARFORMATSUPPORTED is called in
the protocol to
> check which image formats are suported. If it don't
exists any image
> format can be sent to the protocol
> 2d. The image is resized and sent to the protocol
throught the
> PS_SETMYAVATAR service. The image passed is a temporary
one and will
> be deleted after the return of the call
> 3. When the user deletes an avatar the service
PS_SETMYAVATAR is
> called, passing NULL as image file (this is a new
behaviour of this
> service)
>
>
> The notification that the avatar has changed is get
from one of the following:
> - a MS_AV_REPORTMYAVATARCHANGED service call
> - The setting AvatarFile or PictObject or AvatarHash of
the protocol is changed
>
>
> There are some things still missing:
> - Support for XML files in ICQ (or any protocol that
reports support
> of xml/swf images)
> - Use the original image selected by the user if no
resize is needed
> (actually the image is always saved to disk, what isn't
really needed
> and can cause problems with transparency)
> - Option to use one avatar to all protocols
>
>
> Well, that's all, folks.
> Pescuma
>
>
>
>
> PS: A more descriptive info of the above services:
>
> /*
> wParam=0
> lParam=(const char *)Avatar file name or NULL to remove
the avatar
> return=0 for sucess
> */
> #define PS_SETMYAVATAR "/SetMyAvatar"
>
> /*
> wParam=(char *)Buffer to file name
> lParam=(int)Buffer size
> return=0 for sucess
> */
> #define PS_GETMYAVATAR "/GetMyAvatar"
>
> /*
> wParam=(int *)max width of avatar - will be set (-1 for
no max)
> lParam=(int *)max height of avatar - will be set (-1
for no max)
> return=0 for sucess
> */
> #define PS_GETMYAVATARMAXSIZE
"/GetMyAvatarMaxSize"
>
> /*
> wParam=0
> lParam=0
> return=One of PIP_SQUARE, PIP_FREEPROPORTIONS
> */
> #define PIP_FREEPROPORTIONS     0
> #define PIP_SQUARE                      1
> #define PS_GETMYAVATARIMAGEPROPORTION
"/GetMyAvatarImageProportion"
>
> /*
> wParam = 0
> lParam = PA_FORMAT_*   // avatar format
> return = 1 (supported) or 0 (not supported)
> */
> #define PS_ISAVATARFORMATSUPPORTED
"/IsAvatarFormatSupported"
>
>
>
> PS 2: Could someone please add this funcion near the
CallProtoService one?
> // See if a protocol service exists
> __inline static int ProtoServiceExists(const char
*szModule,const char
> *szService)
> {
>        char str[MAXMODULELABELLENGTH * 2];
>        strcpy(str,szModule);
>        strcat(str,szService);
>        return ServiceExists(str);
> }
>

------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Miranda-Develop mailing list
Miranda-Developlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/miranda
-develop

[1-10]

about | contact  Other archives ( Real Estate discussion Medical topics )