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

palm_installer_base Class Reference

Abstract class to query Palm users and install files to a Palm device. More...

#include <palm_installer_base.h>

Inheritance diagram for palm_installer_base:

palm_installer List of all members.

Public Methods

  palm_installer_base ()
  Constructor.

virtual  ~palm_installer_base ()
  Destructor.

int  get_last_user_index ()
  Get the index number (in our m_users_array) of the last palm user.

int  get_number_of_users ()
  Get the number of palm users on the machine.

wxString  get_palm_desktop_path ()
  Get the system path to the palm desktop directory.

wxUint32  get_user_magic (int user_index)
  Get a palm user's magic number.

wxString  get_user_name (int user_index)
  Get the palm user's name from the index.

void  get_user_name_array (wxArrayString &user_name_array)
  Return a string of all palm user names.

wxString  get_user_subdirectory (int user_index)
  Return a palm user's subdirectory.

int  get_user_index_from_user_name (const wxString &user_name)
  Get the palm user's index in our m_users_array, based on their name.

bool  install_files_by_directory (const wxString &output_directory, wxArrayString &install_fullnames)
  Install a set of files to a certain directory.

bool  install_file_by_directory (const wxString &output_directory, const wxString &install_fullname)
  Install files to a certain directory.

virtual bool  install_files_by_handheld_dest (handheld_dest_type &handheld_dest, wxArrayString &install_fullnames)=0
  Install files via the handheld_dest_type interface.

virtual bool  install_file_by_handheld_dest (handheld_dest_type &handheld_dest, const wxString &install_fullname)=0
  Install a single file via the handheld_dest_type interface.


Protected Attributes

wxUint8  m_number_of_users
  Number of Palm users on the machine.

wxUint16  m_last_user_index
  Index of the last user in our m_users_array.

wxString  m_palm_desktop_path
  The path to the Palm directory (255 characters max).

wxString  m_last_user_name
  The name of our last user in our m_users_array (31 characters max).

palm_user_array_type  m_users_array
  An array of palm_user_type objects, describing palm users on the machine.


Detailed Description

Abstract class to query Palm users and install files to a Palm device.

A modular non-visual class, describing API functions for the actions to query palm users and install files to their directories, ready to sync.

The OS-specific functions are laid out in a derived palm_installer class.


Member Function Documentation

int palm_installer_base::get_last_user_index  
 

Get the index number (in our m_users_array) of the last palm user.

Returns :
The index of the last user in the array
int palm_installer_base::get_number_of_users  
 

Get the number of palm users on the machine.

Returns :
Number of palm users.
wxString palm_installer_base::get_palm_desktop_path  
 

Get the system path to the palm desktop directory.

Example C:\Palm\

Returns :
Path to palm desktop directory.
int palm_installer_base::get_user_index_from_user_name const wxString &    user_name
 

Get the palm user's index in our m_users_array, based on their name.

Parameters:
user_name  The user's name .
Returns :
user_index The palm user's index in our m_users_array .
wxUint32 palm_installer_base::get_user_magic int    user_index
 

Get a palm user's magic number.

Parameters:
user_index  The palm user's index in our m_users_array .
Returns :
their magic number
wxString palm_installer_base::get_user_name int    user_index
 

Get the palm user's name from the index.

Parameters:
user_index  The palm user's index in our m_users_array .
Returns :
The user's name .
void palm_installer_base::get_user_name_array wxArrayString &    user_name_array
 

Return a string of all palm user names.

Parameters:
user_index  An array in which to store all the palm user names.
Returns :
The user's name .
wxString palm_installer_base::get_user_subdirectory int    user_index
 

Return a palm user's subdirectory.

This is only the subdirectory off the OS's Palm directory. To get the fullname of the directory, need get_palm_desktop_path() then a directory separator, then the value returned by this function.

Parameters:
user_index  The palm user's index in our m_users_array .
Returns :
The user's sudirectory .
bool palm_installer_base::install_file_by_directory const wxString &    output_directory,
const wxString &    install_fullname
 

Install files to a certain directory.

Useful to have, as it makes it simpler to support handheld installs other than Palm. Most of the smaller share devices are smart enough to look in a certain directory for things to sync.

Parameters:
output_directory  The output directory to send the files to be installed.
install_fullname  Fullname of the file to be installed.
Returns :
TRUE if installation was successful .
virtual bool palm_installer_base::install_file_by_handheld_dest handheld_dest_type   handheld_dest,
const wxString &    install_fullname
[pure virtual]
 

Install a single file via the handheld_dest_type interface.

Parameters:
handheld_dest  The handheld_dest_type where the files should be installed.
install_fullnames  The fullnamem of the file to be installed.
This needs to be in derived classes, not base, even though shared. If in base, crashes (wx231).

Implemented in palm_installer.

bool palm_installer_base::install_files_by_directory const wxString &    output_directory,
wxArrayString &    install_fullnames
 

Install a set of files to a certain directory.

Useful to have, as it makes it simpler to support handheld installs other than Palm. Most of the smaller share devices are smart enough to look in a certain directory for things to sync.

Parameters:
output_directory  The output directory to send the files to be installed.
install_fullnames  Array of fullnames of the files to be installed.
Returns :
TRUE if installation was successful .
virtual bool palm_installer_base::install_files_by_handheld_dest handheld_dest_type   handheld_dest,
wxArrayString &    install_fullnames
[pure virtual]
 

Install files via the handheld_dest_type interface.

Parameters:
handheld_dest  The handheld_dest_type where the files should be installed.
install_fullnames  An array of fullnames of files to be installed.
This needs to be in derived classes, not base, even though shared. If in base, crashes (wx231).

Implemented in palm_installer.


Member Data Documentation

palm_user_array_type palm_installer_base::m_users_array [protected]
 

An array of palm_user_type objects, describing palm users on the machine.

Todo:
GURU: A * or not on this sucker? This might be the memory leak of strings. This is what exec sample uses though, for its processes.