X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmaemo%2Fmodest-maemo-utils.h;h=80229daa75edb535172a4f695e1b45be41832605;hp=b1d52fc19aab6c2c654bd9398bddb8d23abb7f66;hb=7929406e046ed92142ff337bd9161e6a16e1d04e;hpb=98f5bc14623d0702fd78ad4b5cf96f8ad0b41fa7 diff --git a/src/maemo/modest-maemo-utils.h b/src/maemo/modest-maemo-utils.h index b1d52fc..80229da 100644 --- a/src/maemo/modest-maemo-utils.h +++ b/src/maemo/modest-maemo-utils.h @@ -32,17 +32,14 @@ #define __MODEST_MAEMO_UTILS_H__ #include +#include /* for FILE* */ #include +#include +#include -/** - * modest_maemo_utils_menubar_to_menu: - * @ui_manager: a ui manager, with the menubar at "/MenuBar" - * - * convert a menubar description (in a GtkUIManager) in to a menu - * - * Returns: a new menu, or NULL in case of error - */ -GtkWidget* modest_maemo_utils_menubar_to_menu (GtkUIManager *ui_manager); + +#define MODEST_MAEMO_UTILS_MYDOCS_FOLDER "MyDocs" +#define MODEST_MAEMO_UTILS_DEFAULT_IMAGE_FOLDER ".images" /** @@ -56,52 +53,62 @@ GtkWidget* modest_maemo_utils_menubar_to_menu (GtkUIManager *ui_manager); */ void modest_maemo_utils_get_device_name (void); + /** - * modest_maemo_utils_folder_writable: - * @filename: a string + * modest_maemo_utils_setup_images_filechooser: + * @chooser: a #GtkFileChooser * - * Checks if @filename is in a writable folder + * Configures the default folder, and mime filter of a filechooser + * for images. + */ +void modest_maemo_utils_setup_images_filechooser (GtkFileChooser *chooser); + + +/** + * modest_maemo_utils_get_osso_context: * - * Returns: %TRUE if @filename is writable, %FALSE otherwise + * get the osso_context pointer for this application + * + * Return: the osso context pointer */ -gboolean modest_maemo_utils_folder_writable (const gchar *filename); +osso_context_t *modest_maemo_utils_get_osso_context (void); /** - * modest_maemo_utils_file_exists: - * @filename: a string + * modest_maemo_open_mcc_mapping_file: * - * Checks if @filename exists + * open the mcc mapping file, or NULL if it fails * - * Returns: %TRUE if @filename currently exists, %FALSE otherwise + * Returns: file ptr or NULL in case of error */ -gboolean modest_maemo_utils_file_exists (const gchar *filename); +FILE* modest_maemo_open_mcc_mapping_file (void); /** - * modest_maemo_utils_create_temp_stream: - * @extension: a string with the extension the file should get, or %NULL - * @path: a string with the created file path + * modest_maemo_set_thumbable_scrollbar: + * @win: a scrollable window + * @thumbable: set it to thumbable (TRUE) or small (FALSE) * - * Creates a temporary fs stream + * changes the thumbability of scrollbars in a scrollable window + */ +void modest_maemo_set_thumbable_scrollbar (GtkScrolledWindow *win, gboolean thumbable); + + +/** + * modest_maemo_get_osso_context: * - * Returns: a #TnyFsStream, or %NULL if operation failed. + * retrieve the osso context for this application + * + * Returns: the current osso_context_t ptr */ -TnyFsStream *modest_maemo_utils_create_temp_stream (const gchar *extension, gchar **path); +osso_context_t* modest_maemo_utils_get_osso_context (void); /** - * modest_maemo_utils_get_supported_secure_authentication_methods: - * @proto: the protocol - * @hostname: hostname of the mail server to check - * @port: mail server port - * @username: username of the account to check for - * @parent_window: a GtkWindow that can be used a parent for progress indication + * modest_maemo_set_osso_context: * - * Get a list of supported authentication methods of the server + * remember the osso-context for this application + * + * @osso_context: a valid osso_context_t pointer * - * Returns: GList* of the method names. This list needs to be freed using g_list_free. - * */ - -GList* modest_maemo_utils_get_supported_secure_authentication_methods (ModestTransportStoreProtocol proto, - const gchar* hostname, gint port, const gchar* username, GtkWindow *parent_window); +void modest_maemo_utils_set_osso_context (osso_context_t *osso_context); #endif /*__MODEST_MAEMO_UTILS_H__*/