yast2-fingerprint-reader

FPrintAgent.h

Go to the documentation of this file.
00001 /* FPrintAgent.h
00002  *
00003  * FPrint agent implementation
00004  *
00005  * Authors: Jiri Suchomel <jsuchome@suse.cz>
00006  *
00007  * $Id: FPrintAgent.h 26456 2005-12-07 16:11:23Z jsuchome $
00008  */
00009 
00010 #ifndef _FPrintAgent_h
00011 #define _FPrintAgent_h
00012 
00013 #include <Y2.h>
00014 #include <scr/SCRAgent.h>
00015 
00016 using namespace std;
00017 
00018 #include <libfprint/fprint.h>
00019 #include <fcntl.h>
00020 #include <errno.h>
00021 #include <sys/types.h>
00022 #include <sys/wait.h>
00023 
00024 #include <string>
00025 
00030 class FPrintAPI
00031 {
00032 
00033 private:
00034     FPrintAPI ();
00035                 
00036     virtual ~FPrintAPI();
00037 
00038 public:
00039 
00040     static FPrintAPI & instance();
00041 
00042     static void catch_sigterm (int);
00043 
00044     int acquire (int, string);
00045 
00046     int test_int;
00047 
00048     struct fp_print_data *data;
00049 
00050     void finalize ();
00051 
00052 };
00053 
00057 class FPrintAgent : public SCRAgent
00058 {
00059 
00060 public:
00061     
00065     FPrintAgent ();
00066                 
00067 
00071     virtual ~FPrintAgent();
00072 
00078     virtual YCPValue Read(const YCPPath &path,
00079                           const YCPValue& arg = YCPNull(),
00080                           const YCPValue& opt = YCPNull());
00081 
00085     virtual YCPBoolean Write(const YCPPath &path,
00086                            const YCPValue& val,
00087                            const YCPValue& arg = YCPNull());
00088 
00092     virtual YCPValue Execute(const YCPPath &path,
00093                              const YCPValue& val = YCPNull(),
00094                              const YCPValue& arg = YCPNull());
00095                  
00099     virtual YCPList Dir(const YCPPath& path);
00100 
00104     virtual YCPValue otherCommand(const YCPTerm& term);
00105 
00109     int data_pipe[2];
00110 
00114     pid_t child_pid;
00115 
00119     int child_retval;
00120 
00121 };
00122 
00123 #endif /* _FPrintAgent_h */

Generated on a sunny day for yast2-fingerprint-reader by doxygen 1.7.3