new class [invitation]

This commit is contained in:
Hylke Bons 2010-08-13 00:27:28 +01:00
parent 80e03c86e1
commit 6e51d4524d
5 changed files with 54 additions and 2 deletions

View file

@ -23,8 +23,7 @@ using System.Timers;
namespace SparkleLib {
public class SparkleRepo
{
public class SparkleRepo {
private Process Process;
private Timer FetchTimer;

View file

@ -11,6 +11,7 @@ SOURCES = \
SparkleBubble.cs \
SparkleEntry.cs \
SparkleIntro.cs \
SparkleInvitation.cs \
SparkleShare.cs \
SparkleSpinner.cs \
SparkleStatusIcon.cs \

View file

@ -0,0 +1,43 @@
// SparkleShare, an instant update workflow to Git.
// Copyright (C) 2010 Hylke Bons <hylkebons@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.IO;
using System.Xml;
namespace SparkleShare {
class SparkleInvitation {
public SparkleInvitation (string file_path)
{
XmlDocument xml_doc = new XmlDocument ();
xml_doc.Load (file_path);
XmlNodeList server_xml = xml_doc.GetElementsByTagName ("server");
XmlNodeList repository_xml = xml_doc.GetElementsByTagName ("repository");
XmlNodeList key_xml = xml_doc.GetElementsByTagName ("key");
string server = server_xml [0].InnerText;
string repository = repository_xml [0].InnerText;
string key = key_xml [0].InnerText;
}
}
}

View file

@ -49,6 +49,8 @@ namespace SparkleShare {
BusG.Init ();
Gtk.Application.Init ();
SparkleInvitation i = new SparkleInvitation ("/home/hbons/SparkleShare/sparkleshare.invitation");
SetProcessName ("sparkleshare");
Repositories = new List <SparkleRepo> ();

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<sparkleshare_invitation>
<server="git.gnome.org" />
<repository="gnome-design" />
<key="a22bc6f4b9ffe8e5acd4be0838d41aa10a1187dd" />
<email="hylkebons@gmail.com" />
</sparkleshare_invitation>