Days are passing away quickly and there’re just two weeks to start coding. Last week I decided to examine & understand libcryptui but I couldn’t find any documents on Google or something helpful like that (and I was very stubborn about not asking this to Adam- because i shouldn’t ask everything to my mentor as i’m a student and have to find my way ultimately, right? (yep, sometimes I became some kind of a psychopath). Hmm.. and a confession: I wanted to make my mentors a bit suprised about how cool my work is (because i couldn’t interested in the project enough because of uni. exams).. So..
DON’T try at home! If so, you’ll lose days like me. With a regretful heart, a mixed-up brain, and,.. poor me
Advice: Please talk with your mentor about what you’re going to do.
What happened? So for a couple of days I couldn’t do anything, just paralized. Then the amazon inside me had rised suddenly so then I started to examine codes, tried to understand code structures in these days.. At the end I prepared a little documentation about libcryptui, its functions and what it stands for. However I don’t know if my ideas about the library are true, or this is the best part to start..
libcryptui: a simple api for key selection
Simply we’ll start with index of libcryptui. It has those headers and files:
/seahorse/libcryptui
* libcryptui/cryptui-defines.h
* cryptui-key-chooser.c
* cryptui-key-chooser.h
* cryptui-key-combo.c
* cryptui-key-combo.h
* cryptui-key-list.c
* cryptui-key-list.h
* cryptui-key-store.c
* cryptui-key-store.h
* cryptui-keyset.c
* cryptui-keyset.h
* cryptui-marshal.list
* cryptui-priv.h
* cryptui.c
* cryptui.h
* cryptui.pc.in
/seahorse/libcryptui/cryptui-defines.h
Just a simple header file for declarations that will used by both libseahorse and libcryptui.
/seahorse/libcryptui/cryptui-keyset.h
(includes gtk.h & cryptui.h)
Needed declarations about cryptui. Has two structs [_CryptUIKeyset, _CryptUIKeysetClass] that will be used in /seahorse/libcryptui/cryptui-keyset.c as keysets for removing, adding, updating keys functions (we’ll see this functs later on at cryptui-keyset.c)
/seahorse/libcryptui/cryptui-keyset.c
Now time came for using our cryptui-keyset structs. Besides this c file includes “cryptui-keyset.h”, “cryptui-marshal.h” (?), and “dbus-glib-bindings.h”.
This file has those functions with their arguments’ types.
- static gboolean remove_update (const gchar, gpointer, CryptUIKeyset)
Takes parameters from remove_key funct. end updates keyset after removing the key.
- static void remove_key (const gchar, gpointer, CryptUIKeyset):
Sends required parameters to remove_update fuct. for removing keys.
I’ll continue to transfer document from my scraps this evening, but now i have to go to the school
PS: If I have mistakes (and sure i will) please leave a comment.