Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

palm_installer_base.h

Go to the documentation of this file.
      00001 //----------------------------------------------------------------------------------------
      00011 // RCS-ID:      $Id: palm_installer_base.h,v 1.11 2003/02/06 21:47:30 robertoconnor Exp $
      00012 //----------------------------------------------------------------------------------------
      00013 
      00014 //----------------------------------------------------------------------------------------
      00015 // Begin single inclusion of this .h file condition
      00016 //----------------------------------------------------------------------------------------
      00017 
      00018 #ifndef _PALM_INSTALLER_BASE_H_
      00019 #define _PALM_INSTALLER_BASE_H_
      00020 
      00021 //----------------------------------------------------------------------------------------
      00022 // GCC interface
      00023 //----------------------------------------------------------------------------------------
      00024 
      00025 #if defined(__GNUG__) && ! defined(__APPLE__)
      00026     #pragma interface "palm_installer_base.h"
      00027 #endif
      00028 
      00029 //----------------------------------------------------------------------------------------
      00030 // Shared defines
      00031 //----------------------------------------------------------------------------------------
      00032 
      00033 #include "plucker_defines.h"
      00034 
      00035 //----------------------------------------------------------------------------------------
      00036 // Headers
      00037 //----------------------------------------------------------------------------------------
      00038 
      00039 #include "wx/object.h"
      00040 #include "wx/string.h" // Need to include strings and things, else GCC rightly stops.
      00041 #include "handheld_dest_type.h"
      00042 
      00043 //----------------------------------------------------------------------------------------
      00044 // Struct definition: palm_user_type
      00045 //----------------------------------------------------------------------------------------
      00046 
      00048 
      00051 struct palm_user_type {
      00053     wxUint32 magic;
      00055     wxString name;
      00057     wxString subdirectory;
      00058 };
      00059 
      00060 // ----------------------------------------------------------------------------------------
      00061 // Define an array type for our class (an array of pointers only). Note that 
      00062 // WX_DEFINE_ARRAY is only for ints/pointers, not objects. 
      00063 // This WX macro declares a new array type, called palm_user_array_type,
      00064 // which consists of a number of palm_user_type items.
      00065 // ----------------------------------------------------------------------------------------
      00066 
      00067 WX_DEFINE_ARRAY( palm_user_type*, palm_user_array_type );
      00068 
      00069 //----------------------------------------------------------------------------------------
      00070 // Class definition: palm_installer_base
      00071 //----------------------------------------------------------------------------------------
      00072 
      00074 
      00080 class palm_installer_base : public wxObject
      00081 {
      00082 
      00083     // wxMacro to declare an abstract class
      00084     DECLARE_ABSTRACT_CLASS( palm_installer_base );
      00085 
      00086 public:
      00087     
      00089     palm_installer_base();
      00090     
      00092     virtual ~palm_installer_base();
      00093     
      00095 
      00098     int             get_last_user_index();
      00099     
      00101 
      00104     int             get_number_of_users();
      00105     
      00107 
      00111     wxString        get_palm_desktop_path();
      00112     
      00114 
      00118     wxUint32        get_user_magic( int user_index );
      00119 
      00121 
      00125     wxString        get_user_name( int user_index );
      00126 
      00128 
      00132     void            get_user_name_array( wxArrayString& user_name_array );
      00133 
      00135 
      00142     wxString        get_user_subdirectory( int user_index );
      00143 
      00145 
      00149     int             get_user_index_from_user_name( const wxString& user_name );
      00150 
      00152 
      00160     bool            install_files_by_directory( const wxString& output_directory,
      00161                                                 wxArrayString& install_fullnames
      00162                                               );
      00164 
      00172     bool            install_file_by_directory( const wxString& output_directory,
      00173                                               const wxString& install_fullname );
      00174 
      00176 
      00183     virtual bool    install_files_by_handheld_dest( handheld_dest_type& handheld_dest,
00184                                                     wxArrayString& install_fullnames
00185                                                   ) = 0;
00186 
00188 
00195     virtual bool    install_file_by_handheld_dest( handheld_dest_type& handheld_dest,
00196                                                    const wxString& install_fullname
00197                                                   ) = 0;
00198 
00199 protected:
00200 
00202     wxUint8              m_number_of_users;
00203 
00205     wxUint16             m_last_user_index;
00206 
00208     wxString             m_palm_desktop_path;
00209 
00211     wxString             m_last_user_name;             
00212     
00214 
00219     palm_user_array_type m_users_array;
00220     
00221 };
00222 
00223 //----------------------------------------------------------------------------------------
00224 // End single inclusion of this .h file condition
00225 //----------------------------------------------------------------------------------------
00226 
00227 #endif  //_PALM_INSTALLER_BASE_H_
00228