libmissioncontrol-server Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
#include <mcd-mission.h> McdMission; #define MCD_MISSION_GET_FLAGS_MASKED (mission, flags) #define MCD_MISSION_SET_FLAGS_MASKED (mission, flags) #define MCD_MISSION_UNSET_FLAGS_MASKED (mission, flags) enum McdMode; enum McdSystemFlags; McdMission * mcd_mission_new (void); gboolean mcd_mission_is_connected (McdMission *mission); McdMission * mcd_mission_get_parent (McdMission *mission); void mcd_mission_abort (McdMission *mission); void mcd_mission_set_parent (McdMission *mission, McdMission *parent); void mcd_mission_connect (McdMission *mission); void mcd_mission_disconnect (McdMission *mission); void mcd_mission_set_flags (McdMission *mission, McdSystemFlags flags); McdSystemFlags mcd_mission_get_flags (McdMission *mission); void mcd_mission_set_mode (McdMission *mission, McdMode mode); McdMode mcd_mission_get_mode (McdMission *mission);
"mode" McdMode : Read / Write "parent" McdMission* : Read / Write "system-flags" McdMode : Read / Write
"abort" : Run First "connected" : Run First "disconnected" : Run First "flags-changed" : Run First "mode-set" : Run First "parent-set" : Run First
It is the base class for every object in mission-control. It defines a set of virtual functions and set of corresponding action signals. all virtual functions results in emission of their corresponding action signals. The virtual functions define states of the object, such as memory conserved state, connected state, locked state, low power state, lit state, sleeping state etc. Each of the object states can also be queried independently as properties.
There are also some action signals such as abort, which is used to notify other objects holding hard references to it to release them (this object should then automatically die since all held references are released). It is mandatory for all other objects that hold a hard reference to it to listen for this signal and release the reference in signal handler.
Concrete derived classes should override the sate methods to implement object specific state managements.
#define MCD_MISSION_GET_FLAGS_MASKED(mission, flags)
|
|
|
#define MCD_MISSION_SET_FLAGS_MASKED(mission, flags)
|
|
|
#define MCD_MISSION_UNSET_FLAGS_MASKED(mission, flags)
|
|
|
typedef enum { MCD_MODE_UNKNOWN, MCD_MODE_NORMAL, MCD_MODE_RESTRICTED, MCD_MODE_CALL } McdMode;
typedef enum { MCD_SYSTEM_CONNECTED = 1, MCD_SYSTEM_MEMORY_CONSERVED = 1 << 1, MCD_SYSTEM_POWER_CONSERVED = 1 << 2, MCD_SYSTEM_SCREEN_BLANKED = 1 << 3, MCD_SYSTEM_LOCKED = 1 << 4, MCD_SYSTEM_IDLE = 1 << 5 } McdSystemFlags;
gboolean mcd_mission_is_connected (McdMission *mission);
|
|
Returns : |
McdMission * mcd_mission_get_parent (McdMission *mission);
|
|
Returns : |
void mcd_mission_set_parent (McdMission *mission, McdMission *parent);
|
|
|
void mcd_mission_set_flags (McdMission *mission, McdSystemFlags flags);
|
|
|
McdSystemFlags mcd_mission_get_flags (McdMission *mission);
|
|
Returns : |
void mcd_mission_set_mode (McdMission *mission, McdMode mode);
|
|
|
"mode"
property"mode" McdMode : Read / Write
Platform-specific modes.
Default value: MCD_MODE_NORMAL
"system-flags"
property"system-flags" McdMode : Read / Write
Mission control system flags.
Default value: MCD_MODE_NORMAL
"abort"
signalvoid user_function (McdMission *mcdmission, gpointer user_data) : Run First
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"connected"
signalvoid user_function (McdMission *mcdmission, gpointer user_data) : Run First
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"disconnected"
signalvoid user_function (McdMission *mcdmission, gpointer user_data) : Run First
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"flags-changed"
signalvoid user_function (McdMission *mcdmission, McdSystemFlags arg1, gpointer user_data) : Run First
|
the object which received the signal. |
|
|
|
user data set when the signal handler was connected. |
"mode-set"
signalvoid user_function (McdMission *mcdmission, McdMode arg1, gpointer user_data) : Run First
|
the object which received the signal. |
|
|
|
user data set when the signal handler was connected. |
"parent-set"
signalvoid user_function (McdMission *mcdmission, gpointer user_data) : Run First
|
the object which received the signal. |
|
user data set when the signal handler was connected. |