ThinkFingerAgent.h

Go to the documentation of this file.
00001 /* ThinkFingerAgent.h
00002  *
00003  * ThinkFinger agent implementation
00004  *
00005  * Authors: Jiri Suchomel <jsuchome@suse.cz>
00006  *
00007  * $Id: ThinkFingerAgent.h 26456 2005-12-07 16:11:23Z jsuchome $
00008  */
00009 
00010 #ifndef _ThinkFingerAgent_h
00011 #define _ThinkFingerAgent_h
00012 
00013 #include <Y2.h>
00014 #include <scr/SCRAgent.h>
00015 
00016 using namespace std;
00017 
00018 #include <libthinkfinger.h>
00019 #include <errno.h>
00020 #include <sys/types.h>
00021 #include <sys/wait.h>
00022 
00023 #include <string>
00024 
00029 class ThinkFingerAPI
00030 {
00031 
00032 private:
00033     ThinkFingerAPI ();
00034                 
00035     virtual ~ThinkFingerAPI();
00036 
00037 public:
00038 
00039     static ThinkFingerAPI & instance();
00040 
00041     static void catch_sigterm (int);
00042 
00043     int acquire (int, string);
00044 
00045     int test_int;
00046 
00047     libthinkfinger *tf;
00048 
00049     void finalize ();
00050 
00051 };
00052 
00056 class ThinkFingerAgent : public SCRAgent
00057 {
00058 
00059 public:
00060     
00064     ThinkFingerAgent ();
00065                 
00066 
00070     virtual ~ThinkFingerAgent();
00071 
00077     virtual YCPValue Read(const YCPPath &path,
00078                           const YCPValue& arg = YCPNull(),
00079                           const YCPValue& opt = YCPNull());
00080 
00084     virtual YCPBoolean Write(const YCPPath &path,
00085                            const YCPValue& val,
00086                            const YCPValue& arg = YCPNull());
00087 
00091     virtual YCPValue Execute(const YCPPath &path,
00092                              const YCPValue& val = YCPNull(),
00093                              const YCPValue& arg = YCPNull());
00094                  
00098     virtual YCPList Dir(const YCPPath& path);
00099 
00103     virtual YCPValue otherCommand(const YCPTerm& term);
00104 
00105 
00109     int data_pipe[2];
00110 
00114     pid_t child_pid;
00115 
00116 };
00117 
00118 #endif /* _ThinkFingerAgent_h */

Generated on Tue Sep 25 20:48:05 2007 for yast2-fingerprint-reader by  doxygen 1.5.3