// Initialize SILC Client Library */
silc_client = silc_client_alloc(&ops, NULL, NULL, "SILC-1.0-0.6.2");
- silc_client->realname = "pekka riikonen";
- silc_client->username = "priikone";
- silc_client->hostname = "mun.oma.kone";
+ silc_client->realname = "Foo T. Bar";
+ silc_client->username = "foobar";
+ silc_client->hostname = "foo.bar.foobar.com";
silc_cipher_register_default();
silc_pkcs_register_default();
silc_hash_register_default();
silc_hmac_register_default();
- silc_create_key_pair("rsa", 1024, "kk", "UN=priikone, "
- "HN=pelle.kuo.fi.ssh.com",
+
+ // XXXXX
+ // In real application at this point it would be of course checked
+ // whether ~/.silc direectory or something exists and key pair exists.
+ // If not then some firstsetup-wizard would be lauched that creates
+ // the keypair. In our example we'll always create a key pair. :(
+ silc_create_key_pair("rsa", 1024, "kk", "UN=foobar, "
+ "HN=foo.bar.foobar.com",
&silc_client->public_key, &silc_client->private_key);
+
+ // We are ready to initialize the SILC Client library.
silc_client_init(silc_client);
- // Setup SILC scheduler as timeout task
+ // Setup SILC scheduler as timeout task. This will handle the SILC
+ // client library every 50 milliseconds. It will actually make the
+ // SILC client work on background.
Gnome::Main::timeout.connect(slot(this, &SilcerApp::silc_scheduler), 50);
+ // XXXXX
+ // This is now used to directly connect to silc.silcnet.org router
+ // XXXXX
silc_schedule_task_add(silc_client->schedule, 0, connect_client,
silc_client, 0, 1, SILC_TASK_TIMEOUT,
SILC_TASK_PRI_NORMAL);
gint SilcerApp::silc_scheduler()
{
+ // Run the SILC client once, and return immediately. This function
+ // is called every 50 milliseconds by the Gnome main loop, to process
+ // SILC stuff. This function will read data, and write data to network,
+ // etc. Makes the client library tick! :)
silc_client_run_one(silc_client);
return 1;
}
--- /dev/null
+<?xml version="1.0"?>
+<GTK-Interface>
+
+<project>
+ <name>Project2</name>
+ <program_name>project2</program_name>
+ <directory></directory>
+ <source_directory>src</source_directory>
+ <pixmaps_directory>pixmaps</pixmaps_directory>
+ <language>C</language>
+ <gnome_support>True</gnome_support>
+ <gettext_support>True</gettext_support>
+</project>
+
+<widget>
+ <class>GtkWindow</class>
+ <name>SilcerFirstsetupDlg</name>
+ <title>window1</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GnomeDruid</class>
+ <name>druid1</name>
+
+ <widget>
+ <class>GnomeDruidPageStart</class>
+ <name>druidpagestart1</name>
+ <title>Silcer - First Time Setup</title>
+ <text>Silcer Gnome SILC Client
+
+You are running the Silcer for first time. This
+setup wizard will guide you through the setup
+procedure. You will need to do this only once!
+
+PRESS NEXT TO CONTINUE</text>
+ <title_color>255,255,255</title_color>
+ <text_color>0,0,0</text_color>
+ <background_color>25,25,112</background_color>
+ <logo_background_color>255,255,255</logo_background_color>
+ <textbox_color>255,255,255</textbox_color>
+ </widget>
+
+ <widget>
+ <class>GnomeDruidPageStandard</class>
+ <name>druidpagestandard1</name>
+ <title>Personal Information</title>
+ <title_color>255,255,255</title_color>
+ <background_color>25,25,112</background_color>
+ <logo_background_color>255,255,255</logo_background_color>
+
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDruidPageStandard:vbox</child_name>
+ <name>druid-vbox1</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame1</name>
+ <border_width>5</border_width>
+ <label>Your Information</label>
+ <label_xalign>0.02</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_OUT</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table1</name>
+ <border_width>45</border_width>
+ <rows>5</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>6</row_spacing>
+ <column_spacing>10</column_spacing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label2</name>
+ <label>Real Name:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry1</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label3</name>
+ <label>Hostname:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label4</name>
+ <label>EMail:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry2</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry3</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label5</name>
+ <label>Username:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry4</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label6</name>
+ <label>
+ PRESS NEXT TO CONTINUE!</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GnomeDruidPageStandard</class>
+ <name>druidpagestandard2</name>
+ <title>Authentication Key Generation</title>
+ <title_color>255,255,255</title_color>
+ <background_color>25,25,112</background_color>
+ <logo_background_color>255,255,255</logo_background_color>
+
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDruidPageStandard:vbox</child_name>
+ <name>druid-vbox2</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame2</name>
+ <border_width>5</border_width>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_OUT</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox1</name>
+ <border_width>30</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label7</name>
+ <label>Random pool generation in progress...</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkProgressBar</class>
+ <name>progressbar1</name>
+ <value>0</value>
+ <lower>0</lower>
+ <upper>100</upper>
+ <bar_style>GTK_PROGRESS_CONTINUOUS</bar_style>
+ <orientation>GTK_PROGRESS_LEFT_TO_RIGHT</orientation>
+ <activity_mode>True</activity_mode>
+ <show_text>False</show_text>
+ <format>%P %%</format>
+ <text_xalign>0.5</text_xalign>
+ <text_yalign>0.5</text_yalign>
+ <child>
+ <padding>1</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label8</name>
+ <label>
+
+Setup Wizard is generating random data and entropy for
+Authentication Key Generation process. Please, move
+your mouse pointer around to generate random data.</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GnomeDruidPageFinish</class>
+ <name>druidpagefinish1</name>
+ <title>Setup Completed</title>
+ <text>The Setup Wizard is completed!
+
+PRESS FINISH TO CONTINUE!</text>
+ <background_color>25,25,112</background_color>
+ <logo_background_color>255,255,255</logo_background_color>
+ <textbox_color>255,255,255</textbox_color>
+ <text_color>0,0,0</text_color>
+ <title_color>255,255,255</title_color>
+ </widget>
+ </widget>
+</widget>
+
+</GTK-Interface>