hdaps.h

Go to the documentation of this file.
00001 /*
00002  * HDAPS Player driver
00003  *
00004  * This driver is for interacting with IBM's Hard Drive Active
00005  * Protection System available on various ThinkPads models.
00006  */
00007 
00008 #ifndef HDAPS_H
00009 #define HDAPS_H
00010 
00011 #ifdef HAVE_CONFIG_H
00012 #include "config.h"
00013 #endif
00014 
00015 #include <sys/types.h>
00016 #include <sys/fcntl.h>
00017 #include <stdio.h>
00018 #include <string.h>
00019 #include <unistd.h>
00020 
00021 #include <libplayercore/playercore.h>
00022 
00023 #define SYSFS_HDAPS_POSITION "/sys/devices/platform/hdaps/position"
00024 
00025 class HDAPS : public Driver 
00026 {
00027   private:
00028    // Joystick state data
00029    player_devaddr_t joystick_id;
00030    player_joystick_data_t data, prev_data;
00031 
00032    // Publish state data.
00033    void PutData(void);
00034 
00035   public:
00036    HDAPS(ConfigFile *cf, int section);
00037    ~HDAPS(void);
00038 
00039    // Thread life-cycle
00040    void Main();
00041    int Setup();
00042    int Shutdown();
00043 
00044    // Message handling
00045    int Subscribe(player_devaddr_t id);
00046    int Unsubscribe(player_devaddr_t id);
00047    int ProcessMessage(MessageQueue *queue, player_msghdr *msghdr, void *data);
00048 };
00049 
00050 #endif

Generated on Sat Jan 13 03:11:09 2007 for ERSP Player driver by  doxygen 1.5.1