On Thu 28. Jul 17:32:32, Holger Macht wrote:
> Hi developers,
> 
> 1. Changing MODE_* to CAPABILITY_*
> ----------------------------------
> 
> at the moment, we have five socalled "MODES" which clients use to connect
> to the daemon:
> 
>    /** Forward acpi event from /proc/acpi/events */
>    #define MODE_ACPI_EVENTS 1
>    /** Forward powersave events created by the daemon */
>    #define MODE_POWERSAVE_EVENTS 2
>    /** Forward notifications the daemon throuws */
>    #define MODE_NOTIFICATIONS 4
>    /** Forward screensaver requests */
>    #define MODE_SCREENSAVER 8
>    /** Forward progress bar requests */
>    #define MODE_PROGRESS 16
> 
> MODE_ACPI_EVENTS and MODE_POWERSAVE_EVENTS really does not have anything
> to do with a capability from clients. The daemon needs not to know whether
> some client uses acpi or powersave events. So at first I like to remove
> these two "MODES".
> 
> Furthermore, I like to rename the remaining three, because MODE_* is not a
> descriptive define. Better is CAPABILITY_*, I think. I like to do it _now_
> because until now noone else (I hope) uses these defines.
> 
> Also I like to rename MODE_SCREENSAVER to CAPABILITY_SCREENLOCK, because
> we do not need a nice screensaver. The only thing that matters is the
> locking of the screen.
> 
> So these defines would look as follows:
> 
>    /** Forward notifications the daemon throuws */
>    #define MODE_NOTIFICATIONS 1
>    /** Forward screenlock requests */
>    #define MODE_SCREENLOCK 2
>    /** Forward progress bar requests */
>    #define MODE_PROGRESS 4

JFYI: Also MODE_PROGRESS will disappear, because the daemon does not need
to know whether a client displays the progress.

[...]


Bye,
        Holger
_______________________________________________
powersave-devel mailing list
[email protected]
http://forge.novell.com/mailman/listinfo/powersave-devel

Reply via email to