• Keine Ergebnisse gefunden

6.2 Chat Debugger

6.3.1 Global preferences

Global preferences are accessible anywhere in code, as communication to preferences le is built into libpurple. There are three types of data used by global preferences in prefs.xml - booleans, integers and strings.

purple_prefs_get_[string/bool/int] (const char* name ) - this command will re-turn the value of preferences entry.

purple_prefs_set_[string/bool/int] (const char* name , const char*/int/bool value ) - sets preference entry value.

Here follows the list of names of preferences and explanations what they represent:

"/plugins/f2f/ui/show_all_elements " - boolean to enable/disable all user interface elements in chat window. Default: True;

"/plugins/f2f/ui/show_toolbar_menu " - boolean, enables/disables F2F menu on tool-bar. Default: True;

"/plugins/f2f/ui/show_progressbar " - boolean, enables/disables progress bar on in-fopane. Default: True;

"/plugins/f2f/ui/show_debug_window " - boolean, enables/disables core debug win-dow. Default: False;

"/plugins/f2f/prefs/cores" - integer, number of shared cores. Default: 1;

"/plugins/f2f/prefs/ram" - integer, amount of shared memory in megabytes. Default:

256;

"/plugins/f2f/info/cpu" - string, processor information in text form - speed, model.

Default: -;

"/plugins/f2f/info/ram" - string, memory information - total amount, speed, type.

Default: -;

"/plugins/f2f/info/always_on" - boolean, if computer is never turned of, then true.

Default: False;

6.3.2 Group preferences

Group preferences consist of two custom structures - ComputerSettings and ComputerInfo.

ComputerInfo is used in ComputerSetting structure.

ComputerInfo - variables that contain important information are gdoubles cores and memory , const chars *cpu_text and *memory_text . cores is the number of cores allowed to use by the group, memory is the amount of memory shared to group. cpu_text is the text form information about processor and memory_text is the memory information.

ComputerSettings - contains const char* nickname , gbooleans progress_bar , toolbar_menu , debug_window , ComputerInfo* info_for_group . nickname is the alias for the group (currently not supported), booleans are for user interface elements as their names suggest.

To get these preferences for group the function to call is:

GroupSettings* get_settings_by_chat_id(int chat_id ) - returns preferences for group with given id.

6.4 Table of computer information

void create_info_table(GList *data ) - displays a new window that contains a table containing data in GList. Each GList element is a ComputerSettings instance that holds users information for certain group.

Summary

Friend-to-Friend Computing is created with a principle to be easy to set up and use.

F2F Computing Pidgin plug-in is one of the possibilities to use Friend-to-Friend Com-puting. In this thesis I analyzed the plug-in that already existed, discussed some new features, that would make using the plug-in even more user friendly., and implemented several of those.

The changes to the main user interface, the chat window, are quite simple, but in my opinion make a big dierence in terms of usability. The F2F menu on the toolbar, makes access to other plug-in features easier. Implementation of this menu requires understanding of of Gtk[5] widgets and Pidgin chat windows structure. This menu can also be extended with ease if plug-in gets new features. The second user interface change to chat window was the adding of the progress bar. The purpose of this element is to give feedback about completion while running computational tasks in terms of a visual progress which can be represented as a percentage. While running other types of services, for example games, it can be disabled, as it has no purpose then.

Another implemented element is the conguration interface of the plug-in. The conguration is divided into two sections plug-in and group conguration. In plug-in conguration a user can set so called global values to limit the total resources used by plug-in. Group preferences does the same for each group, only the values must stay in the limits of global values. However these limitations are one of the things that are not supported by the current F2F Computing core. Conguration interfaces also contain user information to be shared with other contacts and controls to toggle user interface elements. The implementation of the preferences was challenging, as the settings have to be stored, so they can be used at request. Some of these preferences are stored in the le system, so that they are accessible even after restarting Pidgin, others are kept in the memory while program is running.

A feature useful for all users is the Core Debug window, that is separate for each group and contains only plug-in specic data. It was created to replace the Pidgins debug interface, where all the log is shown, but if several groups are active, it is quite dicult to follow. The created debugger can display any data as long as it is representable as text.

Last, I implemented the table of computer information shared by all the contacts in a F2F group. This has the most use for computation tasks in a sense, that group owner can check hardware used by group members before submitting service.

All these changes make a signicant dierence in the user experience even at the moment, when not all of the features are in working order and require further devel-opment of the core. Develdevel-opment of the interface improvements was an interesting experience, as Pidgin is an open source software and anyone can create plug-ins for it. However, it is not very well documented and there is a lot of testing and guessing, what does what. Pidgin documentation aside, it was a great hands on experience of

C/C++ programming and the result was a more user friendly version of the Friend to Friend Computing Pidgin plug-in.

The source code produced during implementation is integrated into the Friend-to-Friend Computing Git repository[3].

F2F Computing Pidgini laienduse kasutamismugavuse parandamine

Bakalaureusetöö (6EAP) Madis Kapsi

Resümee

F2F Computing ehk sõprusraalimine on loodud eesmärgiga, et hõlbustada võrkraal-imist (Grid computing). Sõprusraalimine ühendab võrkraalimise kiirsuhtlus süsteemi-dega. Üks selline lahendus on sõprusraalimise Pidgini laiendus, mille puhul on võrkraal-imine ühendatud erinevaid kiirsuhtlus süsteeme (MSN, ICQ, IRC ja mitmed teised) toetava Pidginiga.

Minu bakalaureusetöö eesmärk oli antud laienduse kasutajaliidese analüüs ja edasi-arendus. Analüüsi ja edasiarendamise juures pidasin silmas, et tulemust saaks kasutada igaüks, kes on oskab Pidginit kasutada ja sinna laiendusi lisada, misläbi hõlbustada veelgi võrkraalimist kasutaja jaoks.

Esialgne rakendus oli loodud kasutades Pidgini enda sisseehitatud võimalusi ka-sutajaliidese kuvamiseks ja eraldiseisev osa kaka-sutajaliidesel puudus. Analüüsi käigus pakkusin välja erinevad võimalused arendada kasutajaliidest selliselt, et see võimaldaks ka häälestamist ja parandaks kasutajale antavat tagasisidet toimuva kohta.

Suurimad visuaalsed muudatused, mis on kohe nähtavad vestlusakna avamisel on lisandunud F2F menüü vestluse tööriistade juures (kirjastiili ja suuruse muutmine, faili saatmine) ja edenemisriba akna ülaservas, kus MSN-i vestluse korral asub kontakti pilt. Loodud menüü võimaldab ligipääsu sõprusraalimise põhisele funktsionaalsusele.

Edenemisriba annab kasutajale tagasisidet käimasoleva protsessi edenemisest, kui see on esitletav arvulisel kujul.

Kasutajaliidese uus osa on iga F2F grupi enda logi aken, mis on loodud asendamaks Pidgini enda logi, kuhu saadetakse kogu Pidgini ja tema laienduste logi, mille tõttu on sealt vajaliku info jälgimine raskendatud. Samuti on täiesti uus grupi teabe vaatamise aken, kus on arvuti ja arvutusjõu jagamise põhine informatsioon grupi liikmete kohta.

Eelkõige on see loodud silmas pidades võrkraalimise arvutusjõu jagamise osa.

Kasutamismugavust silmas pidades on äärmiselt oluline ka antud laienduse häälesta-mise võimalus, mille kasutajaliidese poolne tugi sai ka realiseeritud. Häälestusliidesest on võimalik piirata ressursside jagamist ja kontaktidele näidatavat informatsiooni muuta.

See on kõige olulisem osa kasutajaliidese arendustest, millel puudub sõprusraalimise tu-uma poolne tugi ja sai loodud edasiarenduste toetuse eesmärgil.

Oma töös arendasin kasutamismugavust silmas pidades Pidgini laienduse kasuta-jaliidest sõprusraalimiseks. Kirjeldatud on erinevate komponentide loomist ja nende kasutamisvõimalusi. Edasise arengu käigus vajab kindlasti Pidgini laiendus taas uusi muudatusi, kuid praeguse rakenduse kasutajaliidese parandused on sellisel juhul heaks alguspunktiks, millele tuginedes järjekordseid täiustusi läbi viia.

Bibliography

[1] Adium. http://www.adium.im/.

[2] Empathy. http://live.gnome.org/Empathy.

[3] F2f computing git repository. http://git.ulno.net/cgi-bin/gitweb.cgi?p=f2f.git.

[4] Friend-to-friend (f2f) computing. http://ulno.net/f2f/.

[5] Gtk. http://www.gtk.org/.

[6] Im user base. http://en.wikipedia.org/wiki/Instant_messaging#User_base.

[7] Instant messenger clients. http://en.wikipedia.org/wiki/Comparison_of_instant_messaging_clients/.

[8] Libpurple. http://developer.pidgin.im/wiki/WhatIsLibpurple.

[9] Napster. http://en.wikipedia.org/wiki/Napster.

[10] Peer-to-peer. http://en.wikipedia.org/wiki/Peertopeer.

[11] Pidgin. http://www.pidgin.im.

[12] Sip communicator. http://sip-communicator.org/.

[13] Skype. http://www.skype.com.

[14] Skype api. https://developer.skype.com/Docs.

[15] Telepathy. http://telepathy.freedesktop.org/.

[16] Using pidgin. http://developer.pidgin.im/wiki/Using [17] Webkit. http://trac.adium.im/wiki/WebKit.

[18] Sven Kirsimäe. F2f mobile computing. Master's thesis, University Of Tartu, 2009.

[19] Keio Kraaner. Friend-to-friend computing. Master's thesis, University Of Tartu, 2008.

[20] Eero Vainikko Oleg Batra²ev Ulrich Norbisrath, Keio Kraaner. Friend-to-friend computing - instant messaging based spontaneous desktop grid. The Third Inter-national Conference on Internet and Web Applications and Services (ICIW 2008), pages pp. 245256, June 2008. Athens/Greece, IEEE Computer Society Press.