*/
WSDBusData * ws_dbus_create (gchar *name, gchar *version);
-/**\brief This function is used for setting dbus service/client parameters.
+/**\brief This function is used for setting dbus server/client parameters.
*
*These include the addresses of both remote and local apps communicating
*@param ws_dbus_data - pointer to a structure uniquely identifying
/**
*\brief Initialize D-BUS communication.
*
-*It should be the called after <B>ws_dbus_create</B> and after setting all D-BUS
+*It should be called after <B>ws_dbus_create</B> and after setting all D-BUS
parameters with the <B>ws_dbus_config</B> function.
*The structure it returns is necessary to call out every function implemented in
this wrapper library.
WSDBusStatus ws_dbus_server_return_translations (WSDBusData * ws_dbus_data,
gchar * translation);
-/**
-*This function is used for returning the list of translations the parsing thread
-*finds. It should be ran after the *last thread finishes the search, because it
-also
-*signalizes the GUI that the search has finished.
+/**\brief Returns the progress of an operation.
*
+*It's used to inform a GUI progressbar about the progress
*@param ws_dbus_data - pointer to a structure uniquely identifying the
application for DBus
-*@param translation - a string containing the word's translation
+*@param progress - a double containing the progress. It cannot exceed 1.
*@return WS_STATUS_OK - on success \n
*WS_STATUS_ERROR - on error
*/
-/** \brief Sends an address of data to transmit
+WSDBusStatus ws_dbus_server_update_progressbar (WSDBusData * ws_dbus_data,
+ double progress);
+
+/**\brief It's used to search for words, that have recently been searched for
*
-*Function used in order to increase the speed of data transmission.
-For now it's been added just for testing purposes.
-*The goal is to use the main advantage of threads, that is memory sharing.
-If <I>GUI</I> and <I>MANAGER</I> are in the
-*same memory area, the data pointers also stay in the same memory area.
*@param ws_dbus_data - pointer to a structure uniquely identifying the
application for DBus
-*@param method - name of the method of the remote object to call
-*@param data_address - address of the data
+*@param word - a word.
*@return WS_STATUS_OK - on success \n
*WS_STATUS_ERROR - on error
*/
-WSDBusStatus ws_dbus_send_ptrtodata (WSDBusData * ws_dbus_data,
- gchar *method,
- gulong data_address);
-
-/**\brief Splits the data from buffer generated by ::ws_dbus_concat_data
-*
-*Function used in order to increase the speed of data transmission.
-For now it's been added just for testing purposes.
-*It ommits the limit of D-BUS message fields in one message.
-*@param buffer - pointer to strings concatenated by ws_dbus_concat_data
-*@return GArray of strings
-*/
-
-GArray * ws_dbus_split_data (gpointer buffer);
-
-/**\brief Concatenates data from a GArray to one long buffer ::ws_dbus_split_data
-*
-*Function used in order to increase the speed of data transmission.
-For now it's been added just for testing purposes.
-*It ommits the limit of D-BUS message fields in one message.
-*@param garray - a GArray to be concatenated
-*@return pointer to a buffer
-*/
-
-gpointer ws_dbus_concat_data (GArray *garray);
-
-WSDBusStatus ws_dbus_update_progressbar (WSDBusData * ws_dbus_data,
- double progress);
-
WSDBusStatus ws_dbus_client_search_in_history (WSDBusData * ws_dbus_data,
gchar * word);
-/**\brief Add bookmark
+/**\brief Bookmark a given word
*
-*This is run by <I>GUI</I>. When a user selects a word from the words list,
-this function is called in order
-*to find the translation of the selected word.
+*The given word is stored by the manager in a bookmark's database
*
*@param ws_dbus_data - pointer to a structure uniquely identifying the
application for DBus
-*@param word - a word, for which the user wishes to find the translation
+*@param word - a word to bookmark
+*@param word - a word's translation
*@return WS_STATUS_OK - on success \n
*WS_STATUS_ERROR - on error
*/
-WSDBusStatus ws_dbus_add_bookmark (WSDBusData * ws_dbus_data, gchar * word, gchar *translation);
+WSDBusStatus ws_dbus_client_add_bookmark (WSDBusData * ws_dbus_data, gchar * word, gchar *translation);
/**\brief Remove a bookmark
*
-*This is run by <I>GUI</I>. When a user selects a word from the words list,
-this function is called in order
-*to find the translation of the selected word.
+*The given word is removed from the bookmark's database
*
*@param ws_dbus_data - pointer to a structure uniquely identifying the
application for DBus
-*@param word - a word, for which the user wishes to find the translation
+*@param word - a word to remove from bookmarks
*@return WS_STATUS_OK - on success \n
*WS_STATUS_ERROR - on error
*/
-WSDBusStatus ws_dbus_remove_bookmark (WSDBusData * ws_dbus_data, gchar * word);
+WSDBusStatus ws_dbus_client_remove_bookmark (WSDBusData * ws_dbus_data, gchar * word);
/**\brief Send a message for GUI to display it
*
*WS_STATUS_ERROR - on error
*/
-WSDBusStatus ws_dbus_send_message (WSDBusData* ws_dbus_data, gchar * word);
+WSDBusStatus ws_dbus_server_send_message (WSDBusData* ws_dbus_data, gchar * word);
+
-WSDBusStatus ws_dbus_extract_dictionary(WSDBusData* ws_dbus_data,
+/**\brief Tells the manager to extract a given file
+*
+*This is run by <I>GUI</I>. It allows for decompressing dictionaries
+*compressed with bzip2.
+*
+*@param ws_dbus_data - pointer to a structure uniquely identifying the
+application for DBus
+*@param path - a path to the file to decompress
+*@return WS_STATUS_OK - on success \n
+*WS_STATUS_ERROR - on error
+*/
+WSDBusStatus ws_dbus_client_extract_dictionary(WSDBusData* ws_dbus_data,
gchar* path);
+/**\brief Informs the GUI that the selected file has been extracted
+*
+*This is run by <I>MANAGER</I>.
+*
+*@param ws_dbus_data - pointer to a structure uniquely identifying the
+application for DBus
+*@param path - a path to the decompressed files
+*@return WS_STATUS_OK - on success \n
+*WS_STATUS_ERROR - on error
+*/
WSDBusStatus ws_dbus_server_return_extracted_dict(WSDBusData* ws_dbus_data,
gchar* path);
+
#ifdef __cplusplus
}
#endif