[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/powerdevil/daemon
From:       Dario Freddi <drf () kde ! org>
Date:       2010-12-15 13:31:11
Message-ID: 20101215133111.93F38AC8A8 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1206694 by dafre:

Refine documentation and code style

 M  +49 -8     powerdevilbackendinterface.h  


--- trunk/KDE/kdebase/workspace/powerdevil/daemon/powerdevilbackendinterface.h \
#1206693:1206694 @@ -104,19 +104,32 @@
         */
     enum BrightnessKeyType{ Increase, Decrease };
 
+    /**
+     * This struct contains information for a recall notice from the vendor
+     */
     struct RecallNotice {
+        /** The battery uuid */
         QString batteryId;
+        /** The vendor's name */
         QString vendor;
+        /** The vendor's website */
         QString url;
     };
 
+    /**
+     * Initializes the backend. This function @b MUST be called before the backend \
is usable. Using +     * any method in BackendInterface without initializing it might \
lead to undefined behavior. The signal +     * @c backendReady or @c backendError \
will be streamed upon completion. +     *
+     * @note Backend implementations @b MUST reimplement this function
+     */
     virtual void init() = 0;
 
     /**
         * Retrieves the current state of the system battery.
         *
         * @return the current battery state
-        * @see Solid::Control::PowerManager::BatteryState
+     * @see PowerDevil::BackendInterface::BatteryState
         */
     BatteryState batteryState() const;
 
@@ -131,7 +144,7 @@
         * Retrieves the current state of the system AC adapter.
         *
         * @return the current AC adapter state
-        * @see Solid::Control::PowerManager::AcAdapterState
+     * @see PowerDevil::BackendInterface::AcAdapterState
         */
     AcAdapterState acAdapterState() const;
 
@@ -140,8 +153,8 @@
         * Retrieves the set of suspend methods supported by the system.
         *
         * @return the suspend methods supported by this system
-        * @see Solid::Control::PowerManager::SuspendMethod
-        * @see Solid::Control::PowerManager::SuspendMethods
+     * @see PowerDevil::BackendInterface::SuspendMethod
+     * @see PowerDevil::BackendInterface::SuspendMethods
         */
     SuspendMethods supportedSuspendMethods() const;
 
@@ -168,6 +181,9 @@
         */
     virtual float brightness(BrightnessControlType type = Screen) const;
 
+    /**
+     * @returns whether the lid is closed or not.
+     */
     bool isLidClosed() const;
 
     /**
@@ -183,12 +199,23 @@
         * Should be called when the user presses a brightness key.
         *
         * @param type the type of the brightness key press
-        * @see Solid::Control::PowerManager::BrightnessKeyType
+     * @see PowerDevil::BackendInterface::BrightnessKeyType
         */
     virtual void brightnessKeyPressed(BrightnessKeyType type) = 0;
 
+    /**
+     * Retrieves the capacities of the installed batteries in percentage.
+     *
+     * @returns A dictionary with the battery's capacity percentage mapped to the \
battery uuid. +     */
     QHash< QString, uint > capacities() const;
 
+    /**
+     * Returns a list of recall notices, if available
+     *
+     * @return a list of recall notices
+     * @see PowerDevil::BackendInterface::RecallNotice
+     */
     QList< RecallNotice > recallNotices() const;
 
 Q_SIGNALS:
@@ -196,7 +223,7 @@
         * This signal is emitted when the AC adapter is plugged or unplugged.
         *
         * @param newState the new state of the AC adapter, it's one of the
-        * type @see Solid::Control::PowerManager::AcAdapterState
+     * type @see PowerDevil::BackendInterface::AcAdapterState
         */
     void acAdapterStateChanged(PowerDevil::BackendInterface::AcAdapterState \
newState);  
@@ -204,7 +231,7 @@
         * This signal is emitted when the system battery state changed.
         *
         * @param newState the new state of the system battery, it's one of the
-        * type @see Solid::Control::PowerManager::BatteryState
+     * type @see PowerDevil::BackendInterface::BatteryState
         */
     void batteryStateChanged(PowerDevil::BackendInterface::BatteryState newState);
 
@@ -212,7 +239,7 @@
         * This signal is emitted when a button has been pressed.
         *
         * @param buttonType the pressed button type, it's one of the
-        * type @see Solid::Control::PowerManager::ButtonType
+     * type @see PowerDevil::BackendInterface::ButtonType
         */
     void buttonPressed(PowerDevil::BackendInterface::ButtonType buttonType);
 
@@ -230,10 +257,24 @@
     */
     void batteryRemainingTimeChanged(qulonglong time);
 
+    /**
+     * This signal is emitted when the backend is ready to be used
+     *
+     * @see init
+     */
     void backendReady();
 
+    /**
+     * This signal is emitted if the backend could not be initialized
+     *
+     * @param error Details about the error occurred
+     * @see init
+     */
     void backendError(const QString &error);
 
+    /**
+     * This signal is emitted when the PC is resuming from suspension
+     */
     void resumeFromSuspend();
 
 protected:


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic