/**
 * Module:		StorageClients.ycp
 *
 * Authors:		Thomas Fehr (fehr@suse.de) 
 *
 * Purpose:
 * Contains the functions used to access by the plugins for makefs
 * and parted.
 *
 * $Id: StorageClients.ycp 13162 2004-01-09 12:53:27Z fehr $
 */

{
  module "StorageClients";
  
  import "Popup";
  
  textdomain "storage";

// define macros for the ui that is called by the mkfs client
// in order to update the progressbars.

global define symbol MkfsProgressBar(integer percent)
    ``{
    UI::ChangeWidget(`id(`progress), `Value, percent);
    any ret = UI::PollInput();
    if( ret == `abort && Popup::ConfirmAbort(`unusable ) )
	return `cancel;
    return nil;
    }

// Define the UI update macro for the progress bar.
// This will be downloaded into the parted module.

global define void ShowProgressParted( integer percent )
    ``{
    UI::ChangeWidget(`id(`bar), `Value, percent );
    };

// Define the UI update macro for the directory messages.
// This will be downloaded into the parted module.

global define void ShowDirectoryParted( string message_directory )
    ``{
    UI::ChangeWidget(`id(`dirs), `LastLine, message_directory );
    };

// Define the UI update macro for the diagnostic messages.
// This will be downloaded into the parted module.

global define void ShowDiagnosticParted( string message_diagnostic )
    ``{
    UI::ChangeWidget(`id(`diagnostics), `LastLine, message_diagnostic );
    };

}
