gnome-packagekit r432 - in trunk: data/icons/16x16/status data/icons/22x22/status data/icons/24x24/status data/icons/48x48/status data/icons/scalable/status src
- From: rhughes svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-packagekit r432 - in trunk: data/icons/16x16/status data/icons/22x22/status data/icons/24x24/status data/icons/48x48/status data/icons/scalable/status src
- Date: Fri, 21 Nov 2008 10:09:57 +0000 (UTC)
Author: rhughes
Date: Fri Nov 21 10:09:56 2008
New Revision: 432
URL: http://svn.gnome.org/viewvc/gnome-packagekit?rev=432&view=rev
Log:
add some missing files
Added:
trunk/data/icons/16x16/status/pk-service-pack.png (contents, props changed)
trunk/data/icons/22x22/status/pk-service-pack.png (contents, props changed)
trunk/data/icons/24x24/status/pk-service-pack.png (contents, props changed)
trunk/data/icons/48x48/status/pk-service-pack.png (contents, props changed)
trunk/data/icons/scalable/status/pk-service-pack.svg
trunk/src/egg-console-kit.c
trunk/src/egg-console-kit.h
trunk/src/egg-dbus-monitor.c
trunk/src/egg-dbus-monitor.h
trunk/src/egg-debug.c
trunk/src/egg-debug.h
trunk/src/egg-string-list.c
trunk/src/egg-string-list.h
trunk/src/egg-string.c
trunk/src/egg-string.h
trunk/src/egg-test.c
trunk/src/egg-test.h
trunk/src/egg-unique.c
trunk/src/egg-unique.h
trunk/src/gdb.sh (contents, props changed)
trunk/src/gpk-desktop.c
trunk/src/gpk-desktop.h
trunk/src/org.freedesktop.PackageKit.xml
Modified:
trunk/src/Makefile.am
trunk/src/gpk-application.c
trunk/src/gpk-client-chooser.c
trunk/src/gpk-client-dialog.c
trunk/src/gpk-client-run.c
trunk/src/gpk-client.c
trunk/src/gpk-common.c
trunk/src/gpk-common.h
Added: trunk/data/icons/16x16/status/pk-service-pack.png
==============================================================================
Binary file. No diff available.
Added: trunk/data/icons/22x22/status/pk-service-pack.png
==============================================================================
Binary file. No diff available.
Added: trunk/data/icons/24x24/status/pk-service-pack.png
==============================================================================
Binary file. No diff available.
Added: trunk/data/icons/48x48/status/pk-service-pack.png
==============================================================================
Binary file. No diff available.
Added: trunk/data/icons/scalable/status/pk-service-pack.svg
==============================================================================
--- (empty file)
+++ trunk/data/icons/scalable/status/pk-service-pack.svg Fri Nov 21 10:09:56 2008
@@ -0,0 +1,1379 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.0"
+ x="0px"
+ y="0px"
+ width="40.364689"
+ height="39.722855"
+ viewBox="0 0 39.301 36.396"
+ enable-background="new 0 0 39.301 36.396"
+ xml:space="preserve"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="pk-service-pack.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata
+ id="metadata90"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs88"><linearGradient
+ id="linearGradient3624"><stop
+ id="stop3626"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" /><stop
+ style="stop-color:#ffffff;stop-opacity:0.49803922;"
+ offset="0.5"
+ id="stop3630" /><stop
+ id="stop3628"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:1;" /></linearGradient><linearGradient
+ id="linearGradient3602"><stop
+ id="stop3604"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" /><stop
+ style="stop-color:#535858;stop-opacity:0.67450982;"
+ offset="0.55102038"
+ id="stop3606" /><stop
+ id="stop3610"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:1;" /></linearGradient><linearGradient
+ id="linearGradient3592"><stop
+ style="stop-color:#545959;stop-opacity:1;"
+ offset="0"
+ id="stop3594" /><stop
+ id="stop3596"
+ offset="0.32085034"
+ style="stop-color:#545959;stop-opacity:0.49803922;" /><stop
+ style="stop-color:#545959;stop-opacity:0;"
+ offset="0.64285713"
+ id="stop3598" /><stop
+ style="stop-color:#545959;stop-opacity:1;"
+ offset="1"
+ id="stop3600" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ id="linearGradient3576"><stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3578" /><stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3580" /></linearGradient><linearGradient
+ id="linearGradient3415"><stop
+ style="stop-color:#eeeeec;stop-opacity:1"
+ offset="0"
+ id="stop3417" /><stop
+ id="stop3419"
+ offset="0.58347702"
+ style="stop-color:#eeeeec;stop-opacity:1;" /><stop
+ style="stop-color:#babdb6;stop-opacity:1"
+ offset="1"
+ id="stop3421" /></linearGradient><linearGradient
+ id="linearGradient3386"><stop
+ id="stop3388"
+ offset="0"
+ style="stop-color:#545959;stop-opacity:1;" /><stop
+ style="stop-color:#545959;stop-opacity:0.49803922;"
+ offset="0.24927114"
+ id="stop3393" /><stop
+ id="stop3395"
+ offset="0.64285713"
+ style="stop-color:#545959;stop-opacity:0;" /><stop
+ id="stop3390"
+ offset="1"
+ style="stop-color:#545959;stop-opacity:1;" /></linearGradient><linearGradient
+ id="linearGradient24379"><stop
+ style="stop-color:#d2f2b3;stop-opacity:1;"
+ offset="0"
+ id="stop24381" /><stop
+ style="stop-color:#2f6000;stop-opacity:1;"
+ offset="1"
+ id="stop24383" /></linearGradient><linearGradient
+ id="linearGradient24359"><stop
+ style="stop-color:#5ec100;stop-opacity:1;"
+ offset="0"
+ id="stop24361" /><stop
+ id="stop24411"
+ offset="0.5"
+ style="stop-color:#408200;stop-opacity:1;" /><stop
+ style="stop-color:#73d216;stop-opacity:1;"
+ offset="1"
+ id="stop24363" /></linearGradient><linearGradient
+ id="linearGradient24282"><stop
+ style="stop-color:#73d216;stop-opacity:1;"
+ offset="0"
+ id="stop24284" /><stop
+ id="stop24290"
+ offset="0.5"
+ style="stop-color:#ffffff;stop-opacity:1;" /><stop
+ style="stop-color:#73d216;stop-opacity:1;"
+ offset="1"
+ id="stop24286" /></linearGradient><linearGradient
+ id="linearGradient24268"><stop
+ id="stop24276"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:0.49803922;" /><stop
+ style="stop-color:#732116;stop-opacity:0;"
+ offset="0"
+ id="stop24280" /><stop
+ style="stop-color:#8be137;stop-opacity:0;"
+ offset="1"
+ id="stop24272" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ id="linearGradient7781"><stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop7783" /><stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop7785" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7781"
+ id="linearGradient7826"
+ gradientUnits="userSpaceOnUse"
+ x1="23.5"
+ y1="17.0625"
+ x2="16.124319"
+ y2="17.0625" /><linearGradient
+ id="linearGradient6549"><stop
+ style="stop-color:#8ae234;stop-opacity:1"
+ offset="0"
+ id="stop6551" /><stop
+ style="stop-color:#73d216;stop-opacity:1"
+ offset="1"
+ id="stop6553" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6549"
+ id="linearGradient7822"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.4314406,0,0,1.4345912,0.332755,-5.7794018)"
+ x1="17.894716"
+ y1="14.069843"
+ x2="15.704281"
+ y2="4.725668" /><linearGradient
+ inkscape:collect="always"
+ id="linearGradient6715"><stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop6717" /><stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop6719" /></linearGradient><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6715"
+ id="radialGradient6752"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.5454545,0,6.8181818)"
+ cx="16.5"
+ cy="15"
+ fx="16.5"
+ fy="15"
+ r="5.5" /><linearGradient
+ inkscape:collect="always"
+ id="linearGradient2916"><stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="0"
+ id="stop2918" /><stop
+ style="stop-color:white;stop-opacity:0;"
+ offset="1"
+ id="stop2920" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2916"
+ id="linearGradient2922"
+ x1="24.847851"
+ y1="28.908398"
+ x2="24.847851"
+ y2="25.757175"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0,7)" /><linearGradient
+ inkscape:collect="always"
+ id="linearGradient2902"><stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0"
+ id="stop2905" /><stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="1"
+ id="stop2907" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2902"
+ id="linearGradient2910"
+ x1="22.101398"
+ y1="27.658131"
+ x2="22.971142"
+ y2="20.903238"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0,7)" /><linearGradient
+ inkscape:collect="always"
+ id="linearGradient2986"><stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0"
+ id="stop2988" /><stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="1"
+ id="stop2990" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2986"
+ id="linearGradient2992"
+ x1="21.9375"
+ y1="39"
+ x2="21.9375"
+ y2="37.995617"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0,5)" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8710"
+ id="linearGradient9654"
+ gradientUnits="userSpaceOnUse"
+ x1="40.617188"
+ y1="30.554688"
+ x2="40.710938"
+ y2="30.359375"
+ gradientTransform="matrix(0.707107,0.527555,-0.707107,0.527555,29.0058,-19.09196)" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8710"
+ id="linearGradient9649"
+ gradientUnits="userSpaceOnUse"
+ x1="40.617188"
+ y1="30.554688"
+ x2="40.710938"
+ y2="30.359375"
+ gradientTransform="matrix(0.866025,-0.5,0.5,0.866025,-38.79233,12.403385)" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8710"
+ id="linearGradient9605"
+ gradientUnits="userSpaceOnUse"
+ x1="40.617188"
+ y1="30.554688"
+ x2="40.710938"
+ y2="30.359375"
+ gradientTransform="matrix(0.602867,-0.797841,0.797841,0.602867,-41.12611,49.62773)" /><linearGradient
+ id="linearGradient8710"><stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0"
+ id="stop8712" /><stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="1"
+ id="stop8714" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8710"
+ id="linearGradient8716"
+ x1="40.617188"
+ y1="30.554688"
+ x2="40.710938"
+ y2="30.359375"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0,5)" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8613"
+ id="radialGradient8682"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.662477,0,0,1.61358,-4.989175,-18.65647)"
+ cx="7.5177727"
+ cy="30.573555"
+ fx="7.5177727"
+ fy="30.573555"
+ r="0.53125" /><linearGradient
+ id="linearGradient9641"><stop
+ style="stop-color:white;stop-opacity:1"
+ offset="0"
+ id="stop9643" /><stop
+ style="stop-color:#888a85;stop-opacity:1"
+ offset="1"
+ id="stop9645" /></linearGradient><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient9641"
+ id="radialGradient8680"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.662477,0,0,1.61358,-4.989175,-18.65647)"
+ cx="7.4893188"
+ cy="30.337601"
+ fx="7.4893188"
+ fy="30.337601"
+ r="0.53125" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8613"
+ id="radialGradient8678"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.662477,0,0,1.61358,-4.989175,-18.65647)"
+ cx="7.5177727"
+ cy="30.573555"
+ fx="7.5177727"
+ fy="30.573555"
+ r="0.53125" /><linearGradient
+ id="linearGradient8625"><stop
+ id="stop8627"
+ offset="0"
+ style="stop-color:white;stop-opacity:1" /><stop
+ id="stop8629"
+ offset="1"
+ style="stop-color:#babdb6;stop-opacity:1" /></linearGradient><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8625"
+ id="radialGradient8676"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.662477,0,0,1.61358,-4.989175,-18.65647)"
+ cx="7.4792061"
+ cy="30.36071"
+ fx="7.4792061"
+ fy="30.36071"
+ r="0.53125" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8613"
+ id="radialGradient8666"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.662477,0,0,1.61358,-4.989175,-18.65647)"
+ cx="7.5177727"
+ cy="30.573555"
+ fx="7.5177727"
+ fy="30.573555"
+ r="0.53125" /><linearGradient
+ id="linearGradient9633"><stop
+ style="stop-color:#eeeeec;stop-opacity:1"
+ offset="0"
+ id="stop9635" /><stop
+ style="stop-color:#888a85;stop-opacity:1"
+ offset="1"
+ id="stop9639" /></linearGradient><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient9633"
+ id="radialGradient8664"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.569487,0,0,1.523325,-4.288627,-15.92107)"
+ cx="7.5336008"
+ cy="30.307562"
+ fx="7.5336008"
+ fy="30.307562"
+ r="0.53125" /><linearGradient
+ id="linearGradient8613"><stop
+ style="stop-color:#babdb6;stop-opacity:1"
+ offset="0"
+ id="stop8615" /><stop
+ style="stop-color:#2e3436;stop-opacity:1"
+ offset="1"
+ id="stop8617" /></linearGradient><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8613"
+ id="radialGradient8619"
+ cx="7.5177727"
+ cy="30.573555"
+ fx="7.5177727"
+ fy="30.573555"
+ r="0.53125"
+ gradientTransform="matrix(1.662477,0,0,1.61358,-4.989175,-18.65647)"
+ gradientUnits="userSpaceOnUse" /><linearGradient
+ id="linearGradient5690"><stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="0"
+ id="stop5692" /><stop
+ style="stop-color:#888a85;stop-opacity:0.59848487"
+ offset="1"
+ id="stop5694" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5690"
+ id="linearGradient8603"
+ x1="20.304037"
+ y1="24.035707"
+ x2="18.498415"
+ y2="40.647167"
+ gradientUnits="userSpaceOnUse" /><linearGradient
+ id="linearGradient8631"><stop
+ id="stop8633"
+ offset="0"
+ style="stop-color:#eeeeec;stop-opacity:1" /><stop
+ style="stop-color:#eeeeec;stop-opacity:1;"
+ offset="0.2"
+ id="stop8637" /><stop
+ id="stop8635"
+ offset="1"
+ style="stop-color:#babdb6;stop-opacity:1" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8631"
+ id="linearGradient5865"
+ x1="24"
+ y1="36.638382"
+ x2="25.818018"
+ y2="6.8314762"
+ gradientUnits="userSpaceOnUse" /><linearGradient
+ id="linearGradient3468"><stop
+ style="stop-color:#fdfdfc;stop-opacity:1"
+ offset="0"
+ id="stop3470" /><stop
+ style="stop-color:white;stop-opacity:0.37121212"
+ offset="1"
+ id="stop3472" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3468"
+ id="linearGradient3474"
+ x1="24.748737"
+ y1="35.354588"
+ x2="24.998737"
+ y2="14.997767"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.995556,0,1.068887)" /><linearGradient
+ id="linearGradient2064"><stop
+ id="stop2066"
+ offset="0"
+ style="stop-color:white;stop-opacity:1;" /><stop
+ style="stop-color:#555753;stop-opacity:0.60000002;"
+ offset="0.5"
+ id="stop2070" /><stop
+ id="stop2068"
+ offset="1"
+ style="stop-color:#555753;stop-opacity:0;" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2064"
+ id="linearGradient5790"
+ gradientUnits="userSpaceOnUse"
+ x1="18.048874"
+ y1="25.461344"
+ x2="22.211937"
+ y2="12.143078"
+ gradientTransform="matrix(0.940224,0,0,0.931632,1.331811,6.401537)" /><linearGradient
+ id="linearGradient9613"><stop
+ style="stop-color:white;stop-opacity:1"
+ offset="0"
+ id="stop9615" /><stop
+ id="stop9619"
+ offset="0.5"
+ style="stop-color:white;stop-opacity:1;" /><stop
+ style="stop-color:#cccfca;stop-opacity:1"
+ offset="1"
+ id="stop9617" /></linearGradient><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient9613"
+ id="radialGradient8623"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.389748,0,0,1.348872,-2.91982,-10.63815)"
+ cx="7.5191436"
+ cy="30.304251"
+ fx="7.5191436"
+ fy="30.304251"
+ r="0.53125" /><linearGradient
+ id="linearGradient2839"><stop
+ style="stop-color:white;stop-opacity:0.25773194;"
+ offset="0"
+ id="stop2841" /><stop
+ id="stop2847"
+ offset="0.5472973"
+ style="stop-color:white;stop-opacity:1;" /><stop
+ style="stop-color:white;stop-opacity:0.24705882;"
+ offset="0.66243607"
+ id="stop2849" /><stop
+ id="stop2851"
+ offset="0.875"
+ style="stop-color:white;stop-opacity:0.83505154;" /><stop
+ style="stop-color:white;stop-opacity:0;"
+ offset="1"
+ id="stop2843" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2839"
+ id="linearGradient7658"
+ gradientUnits="userSpaceOnUse"
+ x1="27.057796"
+ y1="12.669416"
+ x2="32.042896"
+ y2="31.219666" /><linearGradient
+ id="linearGradient5740"><stop
+ style="stop-color:#d0d0cb;stop-opacity:1;"
+ offset="0"
+ id="stop5742" /><stop
+ style="stop-color:#babdb6;stop-opacity:1"
+ offset="1"
+ id="stop5744" /></linearGradient><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5740"
+ id="radialGradient5748"
+ cx="25.251999"
+ cy="16.47991"
+ fx="25.251999"
+ fy="16.47991"
+ r="21.980215"
+ gradientTransform="matrix(1.032991,-0.596398,0.575121,0.99614,-12.23456,16.55448)"
+ gradientUnits="userSpaceOnUse" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2909"
+ id="linearGradient4715"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.459833,0,-0.391165,1.370105,40.62503,-13.29892)"
+ x1="15.335379"
+ y1="33.06237"
+ x2="20.329321"
+ y2="36.37693" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2909"
+ id="linearGradient4713"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.42294,-0.875,-15.04578)"
+ x1="15.335379"
+ y1="33.06237"
+ x2="20.329321"
+ y2="36.37693" /><linearGradient
+ id="linearGradient2909"><stop
+ style="stop-color:white;stop-opacity:0;"
+ offset="0"
+ id="stop2911" /><stop
+ id="stop2917"
+ offset="0.5"
+ style="stop-color:white;stop-opacity:1;" /><stop
+ style="stop-color:white;stop-opacity:0;"
+ offset="1"
+ id="stop2913" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2909"
+ id="linearGradient4711"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.42294,10.5,-14.95703)"
+ x1="15.335379"
+ y1="33.06237"
+ x2="20.329321"
+ y2="36.37693" /><linearGradient
+ inkscape:collect="always"
+ id="linearGradient2967"><stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="0"
+ id="stop2969" /><stop
+ style="stop-color:white;stop-opacity:0;"
+ offset="1"
+ id="stop2971" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2967"
+ id="linearGradient2973"
+ x1="12.5"
+ y1="43.1875"
+ x2="12.5"
+ y2="34.045513"
+ gradientUnits="userSpaceOnUse" /><linearGradient
+ id="linearGradient2899"><stop
+ id="stop2901"
+ offset="0"
+ style="stop-color:#555753;stop-opacity:1" /><stop
+ id="stop2903"
+ offset="1"
+ style="stop-color:#2e3436;stop-opacity:1" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2899"
+ id="linearGradient5655"
+ gradientUnits="userSpaceOnUse"
+ x1="53.812813"
+ y1="43.573235"
+ x2="-2.8138931"
+ y2="35.500015"
+ gradientTransform="translate(0,50)" /><linearGradient
+ id="linearGradient2900"><stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="0"
+ id="stop2902" /><stop
+ id="stop2908"
+ offset="0.5"
+ style="stop-color:black;stop-opacity:1;" /><stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="1"
+ id="stop2904" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2900"
+ id="linearGradient4704"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.047911,0,0,2.067521,1.347566,6.673675)"
+ x1="9.8994951"
+ y1="20"
+ x2="9.8994951"
+ y2="13.979153" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2886"
+ id="radialGradient4702"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(4.095822,0,0,3.101282,38.20996,-10.90025)"
+ cx="0"
+ cy="17"
+ fx="0"
+ fy="17"
+ r="2" /><linearGradient
+ inkscape:collect="always"
+ id="linearGradient2886"><stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0"
+ id="stop2888" /><stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="1"
+ id="stop2890" /></linearGradient><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2886"
+ id="radialGradient4700"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(4.095822,0,0,3.101282,-9.53921,-94.5433)"
+ cx="0"
+ cy="17"
+ fx="0"
+ fy="17"
+ r="2" /><linearGradient
+ inkscape:collect="always"
+ id="linearGradient7247"><stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop7249" /><stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop7251" /></linearGradient><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7247"
+ id="radialGradient7253"
+ cx="30.5"
+ cy="6.2929435"
+ fx="30.5"
+ fy="6.2929435"
+ r="7"
+ gradientTransform="matrix(2.0982903,0,0,1.451942,-30.497853,0.5192613)"
+ gradientUnits="userSpaceOnUse" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2397"
+ id="linearGradient8034"
+ gradientUnits="userSpaceOnUse"
+ x1="33.786095"
+ y1="40.792191"
+ x2="35.606419"
+ y2="43.406342" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2508"
+ id="radialGradient8032"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.8459014,0,-2.6674958e-8,0.2782165,5.0485079,30.343064)"
+ cx="31.635492"
+ cy="39.242989"
+ fx="31.635492"
+ fy="39.242989"
+ r="6.1868596" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3345"
+ id="linearGradient8030"
+ gradientUnits="userSpaceOnUse"
+ x1="18.488775"
+ y1="8.672389"
+ x2="18.488775"
+ y2="24.705801" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3345"
+ id="linearGradient8028"
+ gradientUnits="userSpaceOnUse"
+ x1="18.488775"
+ y1="8.672389"
+ x2="18.488775"
+ y2="24.705801" /><linearGradient
+ inkscape:collect="always"
+ id="linearGradient3390"><stop
+ style="stop-color:#ffffff;stop-opacity:0"
+ offset="0"
+ id="stop3392" /><stop
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="1"
+ id="stop3394" /></linearGradient><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3390"
+ id="radialGradient8026"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.9037069,-0.5217554,0.9177806,1.5896425,-14.147728,4.4338202)"
+ cx="33.457024"
+ cy="19.956959"
+ fx="33.457024"
+ fy="19.956959"
+ r="7" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3345"
+ id="linearGradient8024"
+ gradientUnits="userSpaceOnUse"
+ x1="18.488775"
+ y1="8.672389"
+ x2="18.488775"
+ y2="24.705801" /><linearGradient
+ inkscape:collect="always"
+ id="linearGradient3345"><stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3347" /><stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3349" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3345"
+ id="linearGradient8022"
+ gradientUnits="userSpaceOnUse"
+ x1="18.488775"
+ y1="8.672389"
+ x2="18.488775"
+ y2="24.705801" /><linearGradient
+ id="linearGradient2397"><stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop2399" /><stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop2401" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2397"
+ id="linearGradient8020"
+ gradientUnits="userSpaceOnUse"
+ x1="33.786095"
+ y1="40.792191"
+ x2="35.606419"
+ y2="43.406342" /><linearGradient
+ id="linearGradient2508"><stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop2510" /><stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop2512" /></linearGradient><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2508"
+ id="radialGradient8018"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.8459014,0,-2.6674958e-8,0.2782165,5.0485079,30.343064)"
+ cx="31.635492"
+ cy="39.242989"
+ fx="31.635492"
+ fy="39.242989"
+ r="6.1868596" /><linearGradient
+ id="linearGradient7789"><stop
+ id="stop7791"
+ offset="0"
+ style="stop-color:#559615;stop-opacity:0;" /><stop
+ style="stop-color:#c0f988;stop-opacity:1;"
+ offset="0.5"
+ id="stop3446" /><stop
+ id="stop7793"
+ offset="1"
+ style="stop-color:#73d216;stop-opacity:0;" /></linearGradient><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7789"
+ id="linearGradient8016"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(5,0)"
+ x1="32.426598"
+ y1="9.122757"
+ x2="28.5"
+ y2="18.520807" /><linearGradient
+ inkscape:collect="always"
+ id="linearGradient8046"><stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop8048" /><stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop8050" /></linearGradient><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8046"
+ id="radialGradient8052"
+ cx="38.8125"
+ cy="39.8125"
+ fx="38.8125"
+ fy="39.8125"
+ r="8.6875"
+ gradientTransform="matrix(1,0,0,0.4244604,0,22.913669)"
+ gradientUnits="userSpaceOnUse" /><inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 18.198 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="39.300999 : 18.198 : 1"
+ inkscape:persp3d-origin="19.650499 : 12.132 : 1"
+ id="perspective92" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7247"
+ id="radialGradient23322"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.0982903,0,0,1.451942,-80.764424,-6.7046026)"
+ cx="30.5"
+ cy="6.2929435"
+ fx="30.5"
+ fy="6.2929435"
+ r="7" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2916"
+ id="linearGradient23341"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(42.516968,0.6533169)"
+ x1="24.847851"
+ y1="28.908398"
+ x2="24.847851"
+ y2="25.757175" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2902"
+ id="linearGradient23344"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(42.516968,0.6533169)"
+ x1="22.101398"
+ y1="27.658131"
+ x2="22.971142"
+ y2="20.903238" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2986"
+ id="linearGradient23347"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(42.516968,-1.3466831)"
+ x1="21.9375"
+ y1="39"
+ x2="21.9375"
+ y2="37.995617" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8710"
+ id="linearGradient23350"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.707107,0.527555,-0.707107,0.527555,71.522768,-25.438643)"
+ x1="40.617188"
+ y1="30.554688"
+ x2="40.710938"
+ y2="30.359375" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8710"
+ id="linearGradient23353"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.866025,-0.5,0.5,0.866025,3.724638,6.0567019)"
+ x1="40.617188"
+ y1="30.554688"
+ x2="40.710938"
+ y2="30.359375" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8710"
+ id="linearGradient23356"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.602867,-0.797841,0.797841,0.602867,1.390858,43.281047)"
+ x1="40.617188"
+ y1="30.554688"
+ x2="40.710938"
+ y2="30.359375" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8710"
+ id="linearGradient23359"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(42.516968,-1.3466831)"
+ x1="40.617188"
+ y1="30.554688"
+ x2="40.710938"
+ y2="30.359375" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3468"
+ id="linearGradient23378"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.995556,42.516968,-5.2777961)"
+ x1="24.748737"
+ y1="35.354588"
+ x2="24.998737"
+ y2="14.997767" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2064"
+ id="linearGradient23381"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.940224,0,0,0.931632,43.848779,5.48539e-2)"
+ x1="18.048874"
+ y1="25.461344"
+ x2="22.211937"
+ y2="12.143078" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5740"
+ id="radialGradient23386"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.032991,-0.596398,0.575121,0.99614,30.282408,10.207797)"
+ cx="25.251999"
+ cy="16.47991"
+ fx="25.251999"
+ fy="16.47991"
+ r="21.980215" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7789"
+ id="linearGradient24209"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(5,0)"
+ x1="32.426598"
+ y1="9.122757"
+ x2="28.5"
+ y2="18.520807" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2508"
+ id="radialGradient24211"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.8459014,0,-2.6674958e-8,0.2782165,5.0485079,30.343064)"
+ cx="31.635492"
+ cy="39.242989"
+ fx="31.635492"
+ fy="39.242989"
+ r="6.1868596" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2397"
+ id="linearGradient24213"
+ gradientUnits="userSpaceOnUse"
+ x1="33.786095"
+ y1="40.792191"
+ x2="35.606419"
+ y2="43.406342" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3345"
+ id="linearGradient24215"
+ gradientUnits="userSpaceOnUse"
+ x1="18.488775"
+ y1="8.672389"
+ x2="18.488775"
+ y2="24.705801" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3345"
+ id="linearGradient24217"
+ gradientUnits="userSpaceOnUse"
+ x1="18.488775"
+ y1="8.672389"
+ x2="18.488775"
+ y2="24.705801" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3390"
+ id="radialGradient24219"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.9037069,-0.5217554,0.9177806,1.5896425,-14.147728,4.4338202)"
+ cx="33.457024"
+ cy="19.956959"
+ fx="33.457024"
+ fy="19.956959"
+ r="7" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3345"
+ id="linearGradient24221"
+ gradientUnits="userSpaceOnUse"
+ x1="18.488775"
+ y1="8.672389"
+ x2="18.488775"
+ y2="24.705801" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3345"
+ id="linearGradient24223"
+ gradientUnits="userSpaceOnUse"
+ x1="18.488775"
+ y1="8.672389"
+ x2="18.488775"
+ y2="24.705801" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2508"
+ id="radialGradient24225"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.8459014,0,-2.6674958e-8,0.2782165,5.0485079,30.343064)"
+ cx="31.635492"
+ cy="39.242989"
+ fx="31.635492"
+ fy="39.242989"
+ r="6.1868596" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2397"
+ id="linearGradient24227"
+ gradientUnits="userSpaceOnUse"
+ x1="33.786095"
+ y1="40.792191"
+ x2="35.606419"
+ y2="43.406342" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7789"
+ id="linearGradient24238"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-47.266571,-6.2238639)"
+ x1="32.426598"
+ y1="9.122757"
+ x2="28.5"
+ y2="18.520807" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient24282"
+ id="linearGradient24288"
+ x1="1.462"
+ y1="11.132527"
+ x2="37.839001"
+ y2="11.132527"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.0643442,0,0,0.9986147,-1.0473572,-0.5848942)" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient24359"
+ id="linearGradient24308"
+ x1="1.649"
+ y1="4.2779999"
+ x2="37.363998"
+ y2="4.2779999"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0.2499995,-0.600317)" />
+
+
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient24282"
+ id="linearGradient24325"
+ x1="1.7000001e-07"
+ y1="20.921875"
+ x2="39.329296"
+ y2="20.921875"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.9991744,0,0,1.0660191,0.2662338,-1.0033463)" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3468"
+ id="linearGradient24357"
+ x1="19.133614"
+ y1="7.992991"
+ x2="19.133614"
+ y2="35.740078"
+ gradientUnits="userSpaceOnUse" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient24359"
+ id="linearGradient24365"
+ x1="20.38805"
+ y1="35.836403"
+ x2="20.261816"
+ y2="8.0893354"
+ gradientUnits="userSpaceOnUse" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient9633"
+ id="linearGradient24409"
+ x1="19.653496"
+ y1="5.3293796"
+ x2="19.653496"
+ y2="3.7371356"
+ gradientUnits="userSpaceOnUse" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3415"
+ id="linearGradient3403"
+ x1="19.6465"
+ y1="7.7290001"
+ x2="19.6465"
+ y2="4.4930291"
+ gradientUnits="userSpaceOnUse" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7789"
+ id="linearGradient3442"
+ x1="7.2310929"
+ y1="5.2195287"
+ x2="31.42437"
+ y2="5.2195287"
+ gradientUnits="userSpaceOnUse" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7789"
+ id="linearGradient3444"
+ gradientUnits="userSpaceOnUse"
+ x1="7.2310929"
+ y1="5.2195287"
+ x2="31.42437"
+ y2="5.2195287" /><radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8625"
+ id="radialGradient3470"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.2011225,0,2.6734569)"
+ cx="19.650999"
+ cy="2.5050001"
+ fx="19.650999"
+ fy="2.5050001"
+ r="9.6210003" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3386"
+ id="linearGradient3472"
+ gradientUnits="userSpaceOnUse"
+ x1="10.03"
+ y1="3.177269"
+ x2="29.271999"
+ y2="3.177269" /><filter
+ inkscape:collect="always"
+ id="filter3572"
+ x="-0.20889211"
+ width="1.4177842"
+ y="-1.5562462"
+ height="4.1124926"><feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="1.7098409"
+ id="feGaussianBlur3574" /></filter><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3576"
+ id="linearGradient3582"
+ x1="19.580666"
+ y1="3.9510059"
+ x2="19.580666"
+ y2="0.70687348"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0.2499995,-0.600317)" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3602"
+ id="linearGradient3590"
+ x1="18.102587"
+ y1="10.590179"
+ x2="18.312092"
+ y2="33.527821"
+ gradientUnits="userSpaceOnUse" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3602"
+ id="linearGradient3612"
+ gradientUnits="userSpaceOnUse"
+ x1="18.102587"
+ y1="10.590179"
+ x2="18.312092"
+ y2="33.527821"
+ gradientTransform="translate(0.4299173,0)" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3602"
+ id="linearGradient3614"
+ gradientUnits="userSpaceOnUse"
+ x1="18.102587"
+ y1="10.590179"
+ x2="18.312092"
+ y2="33.527821" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3624"
+ id="linearGradient3622"
+ x1="19.6495"
+ y1="10.961894"
+ x2="19.6495"
+ y2="33.525772"
+ gradientUnits="userSpaceOnUse" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3415"
+ id="linearGradient3632"
+ gradientUnits="userSpaceOnUse"
+ x1="19.6465"
+ y1="7.7290001"
+ x2="19.6465"
+ y2="4.4930291" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3415"
+ id="linearGradient3634"
+ gradientUnits="userSpaceOnUse"
+ x1="19.6465"
+ y1="7.7290001"
+ x2="19.6465"
+ y2="4.4930291" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient24359"
+ id="linearGradient3636"
+ gradientUnits="userSpaceOnUse"
+ x1="20.38805"
+ y1="35.836403"
+ x2="20.261816"
+ y2="8.0893354" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3468"
+ id="linearGradient3638"
+ gradientUnits="userSpaceOnUse"
+ x1="19.133614"
+ y1="7.992991"
+ x2="19.133614"
+ y2="35.740078" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient24359"
+ id="linearGradient3640"
+ gradientUnits="userSpaceOnUse"
+ x1="20.38805"
+ y1="35.836403"
+ x2="20.261816"
+ y2="8.0893354" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3468"
+ id="linearGradient3642"
+ gradientUnits="userSpaceOnUse"
+ x1="19.133614"
+ y1="7.992991"
+ x2="19.133614"
+ y2="35.740078" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient24359"
+ id="linearGradient3644"
+ gradientUnits="userSpaceOnUse"
+ x1="20.38805"
+ y1="35.836403"
+ x2="20.261816"
+ y2="8.0893354" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3468"
+ id="linearGradient3646"
+ gradientUnits="userSpaceOnUse"
+ x1="19.133614"
+ y1="7.992991"
+ x2="19.133614"
+ y2="35.740078" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3624"
+ id="linearGradient3648"
+ gradientUnits="userSpaceOnUse"
+ x1="19.6495"
+ y1="10.961894"
+ x2="19.6495"
+ y2="33.525772"
+ gradientTransform="translate(0.4205553,0)" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3624"
+ id="linearGradient3650"
+ gradientUnits="userSpaceOnUse"
+ x1="19.6495"
+ y1="10.961894"
+ x2="19.6495"
+ y2="33.525772" /></defs><sodipodi:namedview
+ inkscape:window-height="789"
+ inkscape:window-width="1315"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ guidetolerance="10.0"
+ gridtolerance="10.0"
+ objecttolerance="10.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ showgrid="false"
+ inkscape:zoom="15.358721"
+ inkscape:cx="28.363647"
+ inkscape:cy="19.337737"
+ inkscape:window-x="417"
+ inkscape:window-y="115"
+ inkscape:current-layer="svg2" />
+<g
+ id="Background"
+ transform="translate(0.2499995,1.3996831)">
+</g>
+<g
+ id="Guides"
+ transform="translate(0.2499995,1.3996831)">
+</g>
+<path
+ style="fill:url(#linearGradient24288);fill-opacity:1;stroke:#448705;stroke-width:1.03095567;stroke-miterlimit:3.86369991;stroke-dasharray:none;stroke-opacity:1"
+ id="path9"
+ d="M 2.9526165,21.615584 L 2.664011,2.2854007 C 2.664011,-0.60658729 4.6234688,-0.62456239 5.3482872,-0.62456239 L 34.37934,-0.62456239 C 35.103095,-0.62456239 37.063616,-0.60658729 37.063616,2.2854007 L 37.441679,21.615584 C 35.8006,22.05531 3.1867722,21.713448 2.9526165,21.615584 z"
+ stroke-miterlimit="3.8637"
+ sodipodi:nodetypes="ccccccc" /><path
+ style="fill:url(#linearGradient24308);fill-opacity:1;stroke:#478d04;stroke-width:1;stroke-miterlimit:3.86369991;stroke-dasharray:none;stroke-opacity:1"
+ id="path11"
+ d="M 2.3989995,6.286683 C 2.3989995,6.199683 4.0759996,2.3006831 4.0759996,2.3006831 C 4.3729996,1.2936831 4.9539996,1.0686831 5.6349995,1.0686831 L 34.159,1.0686831 C 34.84,1.0686831 35.421,1.2936831 35.718,2.3006831 L 37.114,6.096683 C 37.114,6.183683 2.3989995,6.286683 2.3989995,6.286683 z"
+ stroke-miterlimit="3.8637" /><path
+ style="fill:none;stroke:url(#linearGradient3582);stroke-width:0.89636368;stroke-miterlimit:3.86369991;stroke-dasharray:none;stroke-opacity:0.45604398"
+ id="path24292"
+ d="M 3.5397027,6.2925467 C 3.5397027,6.2191045 4.8141766,2.9736677 4.8141766,2.9736677 C 5.0968589,2.1235955 5.64985,1.9336589 6.2980207,1.9336589 L 33.446945,1.9336589 C 34.095116,1.9336589 34.648107,2.1235955 34.930788,2.9736677 L 36.121627,6.2700193 C 35.570173,6.4353706 3.5397027,6.2925467 3.5397027,6.2925467 z"
+ stroke-miterlimit="3.8637"
+ sodipodi:nodetypes="ccccccc" /><path
+ style="fill:url(#linearGradient24325);fill-opacity:1;fill-rule:evenodd;stroke:#448705;stroke-width:1.03205526;stroke-miterlimit:4.65999985;stroke-dasharray:none;stroke-opacity:1"
+ d="M 4.5751738,5.0596371 C 2.944521,5.0596371 0.51602753,6.6373453 0.51602763,10.123228 L 0.51602763,34.375161 C 0.51602763,36.11597 1.8506747,37.539905 3.4823268,37.539905 L 36.330187,37.539905 C 37.961839,37.539905 39.296486,36.115971 39.296486,34.375161 C 39.241951,26.295341 39.402045,18.193631 39.234038,10.123228 C 39.153158,7.3518934 37.431683,5.0596371 34.862649,5.0596371 L 4.5751738,5.0596371 z"
+ id="path13"
+ sodipodi:nodetypes="ccccccccc" /><g
+ id="g3433"
+ transform="matrix(1.3083872,0,0,5.8732998,-5.4961786,-25.575194)"
+ style="fill:url(#linearGradient3442);fill-opacity:1;stroke:none"><rect
+ y="5.1354952"
+ x="7.7310929"
+ height="0.16806723"
+ width="23.193277"
+ id="rect3431"
+ style="fill:url(#linearGradient3444);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /></g><g
+ id="g15"
+ transform="matrix(0.9445824,0,0,1.0689818,1.235168,-2.1815658)"
+ style="opacity:0.5970149;fill:url(#linearGradient3644);fill-opacity:1;stroke:url(#linearGradient3646);stroke-width:1.01967692;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">
+ <path
+ style="fill:url(#linearGradient3636);fill-opacity:1;stroke:url(#linearGradient3638);stroke-width:1.01967692;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path17"
+ d="M 0.25,10.927 C 0.25,9.294 1.574,7.97 3.207,7.97 L 36.094,7.97 C 37.727,7.97 39.051,9.294 39.051,10.927 L 39.051,33.19 C 39.051,35.059881 38.402612,36.194376 36.094,36.147 L 3.207,36.147 C 0.99490366,36.194376 0.20174197,35.059881 0.25,33.19 L 0.25,10.927 L 0.25,10.927 z"
+ stroke-miterlimit="3.8637"
+ sodipodi:nodetypes="cccccccccc" />
+ <path
+ style="fill:url(#linearGradient3640);fill-opacity:1;stroke:url(#linearGradient3642);stroke-width:1.01967692;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path19"
+ stroke-miterlimit="3.8637"
+ d="" />
+ </g><g
+ id="g21"
+ style="stroke:url(#linearGradient3622);stroke-width:0.55829006;stroke-miterlimit:2.79999995;stroke-dasharray:none;stroke-opacity:1"
+ transform="matrix(0.9044302,0,0,1.0619949,1.7412142,-1.7439593)">
+ <path
+ style="fill:none;stroke:url(#linearGradient3648);stroke-width:0.55829006;stroke-miterlimit:2.79999995;stroke-dasharray:none;stroke-opacity:1"
+ id="path23"
+ d="M 3.6975553,11.853 C 3.6975553,11.309 4.1385553,10.867 4.6825553,10.867 L 35.457555,10.867 C 36.001555,10.867 36.442555,11.308 36.442555,11.853 L 36.442555,32.266 C 36.442555,32.81 36.001555,33.251 35.457555,33.251 L 4.6835553,33.251 C 4.1395553,33.251 3.6985553,32.81 3.6985553,32.266 L 3.6985553,11.853 L 3.6975553,11.853 z"
+ stroke-miterlimit="3.8637" />
+ <path
+ style="fill:none;stroke:url(#linearGradient3650);stroke-width:0.55829006;stroke-miterlimit:2.79999995;stroke-dasharray:none;stroke-opacity:1"
+ id="path25"
+ stroke-miterlimit="3.8637"
+ d="" />
+ </g><path
+ sodipodi:type="arc"
+ style="opacity:0.715847;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.50599998;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:2.79999995;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3572)"
+ id="path3474"
+ sodipodi:cx="19.644678"
+ sodipodi:cy="4.2921147"
+ sodipodi:rx="9.8223391"
+ sodipodi:ry="1.3184347"
+ d="M 29.467017,4.2921147 A 9.8223391,1.3184347 0 1 1 9.8223391,4.2921147 A 9.8223391,1.3184347 0 1 1 29.467017,4.2921147 z"
+ transform="matrix(1.2181207,0,0,0.8,-4.0019525,-5.5810265e-3)" /><g
+ id="g53"
+ style="fill:url(#linearGradient3403);fill-opacity:1;stroke:#686e6e;stroke-width:0.5;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ transform="translate(0.2499995,-0.600317)">
+ <path
+ style="fill:url(#linearGradient3632);fill-opacity:1;stroke:#686e6e;stroke-width:0.5;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path55"
+ d="M 19.657,3.96 C 20.679,3.971 21.444,4.036 21.444,4.53 L 21.447,6.655 C 21.447,6.852 20.967,7.084 20.654,7.224 C 20.355,7.358 19.644,7.379 19.644,7.379 C 19.644,7.379 18.933,7.358 18.635,7.224 C 18.323,7.084 17.845,6.819 17.846,6.688 L 17.866,4.53 C 17.87,4.036 18.635,3.971 19.657,3.96 z" />
+ <path
+ style="fill:url(#linearGradient3634);fill-opacity:1;stroke:#686e6e;stroke-width:0.5;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path57"
+ d="M 19.657,3.96 C 20.679,3.971 21.444,4.036 21.444,4.53 L 21.447,6.655 C 21.447,6.852 20.967,7.084 20.654,7.224 C 20.355,7.358 19.644,7.379 19.644,7.379 C 19.644,7.379 18.933,7.358 18.635,7.224 C 18.323,7.084 17.845,6.819 17.846,6.688 L 17.866,4.53 C 17.87,4.036 18.635,3.971 19.657,3.96 z"
+ stroke-miterlimit="3.8637" />
+ </g><g
+ id="g3466"
+ transform="matrix(1.0613857,0,0,1.2397896,-0.95629,-1.8236451)"><path
+ stroke-miterlimit="3.8637"
+ d="M 10.574,2.7472689 C 13.336,1.9412689 16.411,1.4922689 19.651,1.4922689 C 22.891,1.4922689 25.965,1.9412689 28.728,2.7472689 L 29.022,4.2842689 L 28.694,4.8612689 C 25.956,4.0432689 22.888,3.5852689 19.651,3.5852689 C 16.411,3.5852689 13.343,4.0442689 10.604,4.8622689 L 10.28,4.2842689 L 10.574,2.7472689 z"
+ id="path83"
+ style="fill:url(#radialGradient3470);fill-opacity:1;stroke:url(#linearGradient3472);stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:3.86369991;stroke-dasharray:none;stroke-opacity:1" /><path
+ sodipodi:nodetypes="csccscc"
+ stroke-miterlimit="3.8637"
+ d="M 28.956078,4.1677783 C 26.119078,3.2314499 23.007,2.70728 19.651,2.70728 C 16.295,2.70728 13.182922,3.3632934 10.344922,4.2996218 L 10.603,4.9941124 C 13.342,4.104546 16.411,3.6053884 19.65,3.6053884 C 22.888,3.6053884 25.955,4.1034585 28.693,4.9930249 L 28.956078,4.1677783 z"
+ id="path85"
+ style="opacity:0.5;fill:#424646;fill-opacity:1;stroke:none;stroke-width:0.5;stroke-miterlimit:3.86369991;stroke-opacity:1" /></g>
+<path
+ d=""
+ stroke-miterlimit="3.8637"
+ id="path24314"
+ style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:3.86369991" /><g
+ id="g3456"
+ transform="translate(0.2499995,-0.3802038)"><rect
+ y="20.090984"
+ x="12.591051"
+ height="3.6916175"
+ width="14.173174"
+ id="rect3452"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /><rect
+ transform="matrix(0,-1,1,0,0,0)"
+ y="17.667025"
+ x="-28.957458"
+ height="4.0212259"
+ width="14.173174"
+ id="rect3454"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /></g><g
+ id="g3460"
+ style="opacity:0.76000001;stroke:url(#linearGradient3590);stroke-width:0.55832154;stroke-linejoin:round;stroke-miterlimit:1.20000005;stroke-dasharray:none;stroke-opacity:1"
+ transform="matrix(0.8751418,0,0,1.0103144,2.3525404,-0.5418077)">
+ <path
+ style="fill:none;stroke:url(#linearGradient3612);stroke-width:0.55832154;stroke-linejoin:round;stroke-miterlimit:1.20000005;stroke-dasharray:none;stroke-opacity:1"
+ id="path3462"
+ d="M 3.7069173,11.853 C 3.7069173,11.309 4.1479173,10.867 4.6919173,10.867 L 35.466917,10.867 C 36.010917,10.867 36.451917,11.308 36.451917,11.853 L 36.451917,32.266 C 36.451917,32.81 36.010917,33.251 35.466917,33.251 L 4.6929173,33.251 C 4.1489173,33.251 3.7079173,32.81 3.7079173,32.266 L 3.7079173,11.853 L 3.7069173,11.853 z"
+ stroke-miterlimit="3.8637" />
+ <path
+ style="fill:none;stroke:url(#linearGradient3614);stroke-width:0.55832154;stroke-linejoin:round;stroke-miterlimit:1.20000005;stroke-dasharray:none;stroke-opacity:1"
+ id="path3464"
+ stroke-miterlimit="3.8637"
+ d="" />
+ </g></svg>
\ No newline at end of file
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Fri Nov 21 10:09:56 2008
@@ -63,6 +63,8 @@
gpk-x11.h \
gpk-marshal.c \
gpk-marshal.h \
+ gpk-desktop.c \
+ gpk-desktop.h \
gpk-animated-icon.c \
gpk-animated-icon.h \
gpk-consolekit.c \
Added: trunk/src/egg-console-kit.c
==============================================================================
--- (empty file)
+++ trunk/src/egg-console-kit.c Fri Nov 21 10:09:56 2008
@@ -0,0 +1,259 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2006-2008 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <string.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <glib.h>
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus.h>
+
+#include "egg-debug.h"
+#include "egg-console-kit.h"
+
+static void egg_console_kit_class_init (EggConsoleKitClass *klass);
+static void egg_console_kit_init (EggConsoleKit *console_kit);
+static void egg_console_kit_finalize (GObject *object);
+
+#define EGG_CONSOLE_KIT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EGG_TYPE_CONSOLE_KIT, EggConsoleKitPrivate))
+
+#define CONSOLEKIT_NAME "org.freedesktop.ConsoleKit"
+#define CONSOLEKIT_PATH "/org/freedesktop/ConsoleKit"
+#define CONSOLEKIT_INTERFACE "org.freedesktop.ConsoleKit"
+
+#define CONSOLEKIT_MANAGER_PATH "/org/freedesktop/ConsoleKit/Manager"
+#define CONSOLEKIT_MANAGER_INTERFACE "org.freedesktop.ConsoleKit.Manager"
+#define CONSOLEKIT_SEAT_INTERFACE "org.freedesktop.ConsoleKit.Seat"
+#define CONSOLEKIT_SESSION_INTERFACE "org.freedesktop.ConsoleKit.Session"
+
+struct EggConsoleKitPrivate
+{
+ DBusGConnection *connection;
+ DBusGProxy *proxy_manager;
+ DBusGProxy *proxy_session;
+ gchar *session_id;
+};
+
+enum {
+ EGG_CONSOLE_KIT_ACTIVE_CHANGED,
+ EGG_CONSOLE_KIT_LAST_SIGNAL
+};
+
+static guint signals [EGG_CONSOLE_KIT_LAST_SIGNAL] = { 0 };
+G_DEFINE_TYPE (EggConsoleKit, egg_console_kit, G_TYPE_OBJECT)
+
+/**
+ * egg_console_kit_is_local:
+ *
+ * Return value: Returns whether the session is local
+ **/
+gboolean
+egg_console_kit_is_local (EggConsoleKit *console)
+{
+ gboolean ret = FALSE;
+ gboolean value = FALSE;
+ GError *error = NULL;
+
+ g_return_val_if_fail (EGG_IS_CONSOLE_KIT (console), FALSE);
+
+ /* maybe console kit does not know about our session */
+ if (console->priv->proxy_session == NULL) {
+ egg_warning ("no ConsoleKit session");
+ goto out;
+ }
+
+ /* is our session local */
+ ret = dbus_g_proxy_call (console->priv->proxy_session, "IsLocal", &error, G_TYPE_INVALID,
+ G_TYPE_BOOLEAN, &value, G_TYPE_INVALID);
+ if (!ret) {
+ g_warning ("IsLocal failed: %s", error->message);
+ g_error_free (error);
+ goto out;
+ }
+
+ /* return value only if we successed */
+ ret = value;
+out:
+ return ret;
+}
+
+/**
+ * egg_console_kit_is_active:
+ *
+ * Return value: Returns whether the session is active on the Seat that it is attached to.
+ **/
+gboolean
+egg_console_kit_is_active (EggConsoleKit *console)
+{
+ gboolean ret = FALSE;
+ gboolean value = FALSE;
+ GError *error = NULL;
+
+ g_return_val_if_fail (EGG_IS_CONSOLE_KIT (console), FALSE);
+
+ /* maybe console kit does not know about our session */
+ if (console->priv->proxy_session == NULL) {
+ egg_warning ("no ConsoleKit session");
+ goto out;
+ }
+
+ /* is our session active */
+ ret = dbus_g_proxy_call (console->priv->proxy_session, "IsActive", &error, G_TYPE_INVALID,
+ G_TYPE_BOOLEAN, &value, G_TYPE_INVALID);
+ if (!ret) {
+ g_warning ("IsActive failed: %s", error->message);
+ g_error_free (error);
+ goto out;
+ }
+
+ /* return value only if we successed */
+ ret = value;
+out:
+ return ret;
+}
+
+/**
+ * egg_console_kit_active_changed_cb:
+ **/
+static void
+egg_console_kit_active_changed_cb (DBusGProxy *proxy, gboolean active, EggConsoleKit *console)
+{
+ egg_debug ("emitting active: %i", active);
+ g_signal_emit (console, signals [EGG_CONSOLE_KIT_ACTIVE_CHANGED], 0, active);
+}
+
+/**
+ * egg_console_kit_class_init:
+ * @klass: The EggConsoleKitClass
+ **/
+static void
+egg_console_kit_class_init (EggConsoleKitClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = egg_console_kit_finalize;
+ g_type_class_add_private (klass, sizeof (EggConsoleKitPrivate));
+ signals [EGG_CONSOLE_KIT_ACTIVE_CHANGED] =
+ g_signal_new ("active-changed",
+ G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EggConsoleKitClass, active_changed),
+ NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN,
+ G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
+}
+
+/**
+ * egg_console_kit_init:
+ **/
+static void
+egg_console_kit_init (EggConsoleKit *console)
+{
+ gboolean ret;
+ GError *error = NULL;
+ guint32 pid;
+
+ console->priv = EGG_CONSOLE_KIT_GET_PRIVATE (console);
+ console->priv->proxy_manager = NULL;
+ console->priv->session_id = NULL;
+
+ /* connect to D-Bus */
+ console->priv->connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
+ if (console->priv->connection == NULL) {
+ egg_warning ("Failed to connect to the D-Bus daemon: %s", error->message);
+ g_error_free (error);
+ goto out;
+ }
+
+ /* connect to ConsoleKit */
+ console->priv->proxy_manager =
+ dbus_g_proxy_new_for_name (console->priv->connection, CONSOLEKIT_NAME,
+ CONSOLEKIT_MANAGER_PATH, CONSOLEKIT_MANAGER_INTERFACE);
+ if (console->priv->proxy_manager == NULL) {
+ egg_warning ("cannot connect to ConsoleKit");
+ goto out;
+ }
+
+ /* get the session we are running in */
+ pid = getpid ();
+ ret = dbus_g_proxy_call (console->priv->proxy_manager, "GetSessionForUnixProcess", &error,
+ G_TYPE_UINT, pid,
+ G_TYPE_INVALID,
+ DBUS_TYPE_G_OBJECT_PATH, &console->priv->session_id,
+ G_TYPE_INVALID);
+ if (!ret) {
+ egg_warning ("Failed to get session for pid %i: %s", pid, error->message);
+ g_error_free (error);
+ goto out;
+ }
+ egg_debug ("ConsoleKit session ID: %s", console->priv->session_id);
+
+ /* connect to session */
+ console->priv->proxy_session =
+ dbus_g_proxy_new_for_name (console->priv->connection, CONSOLEKIT_NAME,
+ console->priv->session_id, CONSOLEKIT_SESSION_INTERFACE);
+ if (console->priv->proxy_session == NULL) {
+ egg_warning ("cannot connect to: %s", console->priv->session_id);
+ goto out;
+ }
+ dbus_g_proxy_add_signal (console->priv->proxy_session, "ActiveChanged", G_TYPE_BOOLEAN, G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal (console->priv->proxy_session, "ActiveChanged",
+ G_CALLBACK (egg_console_kit_active_changed_cb), console, NULL);
+
+out:
+ return;
+}
+
+/**
+ * egg_console_kit_finalize:
+ * @object: The object to finalize
+ **/
+static void
+egg_console_kit_finalize (GObject *object)
+{
+ EggConsoleKit *console;
+
+ g_return_if_fail (EGG_IS_CONSOLE_KIT (object));
+
+ console = EGG_CONSOLE_KIT (object);
+
+ g_return_if_fail (console->priv != NULL);
+ if (console->priv->proxy_manager != NULL)
+ g_object_unref (console->priv->proxy_manager);
+ if (console->priv->proxy_session != NULL)
+ g_object_unref (console->priv->proxy_session);
+ g_free (console->priv->session_id);
+
+ G_OBJECT_CLASS (egg_console_kit_parent_class)->finalize (object);
+}
+
+/**
+ * egg_console_kit_new:
+ *
+ * Return value: a new EggConsoleKit object.
+ **/
+EggConsoleKit *
+egg_console_kit_new (void)
+{
+ EggConsoleKit *console;
+ console = g_object_new (EGG_TYPE_CONSOLE_KIT, NULL);
+ return EGG_CONSOLE_KIT (console);
+}
+
Added: trunk/src/egg-console-kit.h
==============================================================================
--- (empty file)
+++ trunk/src/egg-console-kit.h Fri Nov 21 10:09:56 2008
@@ -0,0 +1,61 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __EGG_CONSOLE_KIT_H
+#define __EGG_CONSOLE_KIT_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define EGG_TYPE_CONSOLE_KIT (egg_console_kit_get_type ())
+#define EGG_CONSOLE_KIT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EGG_TYPE_CONSOLE_KIT, EggConsoleKit))
+#define EGG_CONSOLE_KIT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EGG_TYPE_CONSOLE_KIT, EggConsoleKitClass))
+#define EGG_IS_CONSOLE_KIT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EGG_TYPE_CONSOLE_KIT))
+#define EGG_IS_CONSOLE_KIT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EGG_TYPE_CONSOLE_KIT))
+#define EGG_CONSOLE_KIT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EGG_TYPE_CONSOLE_KIT, EggConsoleKitClass))
+#define EGG_CONSOLE_KIT_ERROR (egg_console_kit_error_quark ())
+#define EGG_CONSOLE_KIT_TYPE_ERROR (egg_console_kit_error_get_type ())
+
+typedef struct EggConsoleKitPrivate EggConsoleKitPrivate;
+
+typedef struct
+{
+ GObject parent;
+ EggConsoleKitPrivate *priv;
+} EggConsoleKit;
+
+typedef struct
+{
+ GObjectClass parent_class;
+ void (* active_changed) (EggConsoleKit *console,
+ gboolean active);
+} EggConsoleKitClass;
+
+GType egg_console_kit_get_type (void) G_GNUC_CONST;
+EggConsoleKit *egg_console_kit_new (void);
+gboolean egg_console_kit_is_local (EggConsoleKit *console);
+gboolean egg_console_kit_is_active (EggConsoleKit *console);
+
+G_END_DECLS
+
+#endif /* __EGG_CONSOLE_KIT_H */
+
Added: trunk/src/egg-dbus-monitor.c
==============================================================================
--- (empty file)
+++ trunk/src/egg-dbus-monitor.c Fri Nov 21 10:09:56 2008
@@ -0,0 +1,277 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2006-2008 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <glib.h>
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-lowlevel.h>
+#include <dbus/dbus.h>
+
+#include "egg-debug.h"
+#include "egg-dbus-monitor.h"
+
+static void egg_dbus_monitor_class_init (EggDbusMonitorClass *klass);
+static void egg_dbus_monitor_init (EggDbusMonitor *dbus_monitor);
+static void egg_dbus_monitor_finalize (GObject *object);
+
+#define EGG_DBUS_MONITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EGG_TYPE_DBUS_MONITOR, EggDbusMonitorPrivate))
+
+struct EggDbusMonitorPrivate
+{
+ EggDbusMonitorType bus_type;
+ gchar *service;
+ DBusGProxy *proxy;
+ DBusGConnection *connection;
+ const gchar *unique_name;
+};
+
+enum {
+ EGG_DBUS_MONITOR_CONNECTION_CHANGED,
+ EGG_DBUS_MONITOR_CONNECTION_REPLACED,
+ EGG_DBUS_MONITOR_LAST_SIGNAL
+};
+
+static guint signals [EGG_DBUS_MONITOR_LAST_SIGNAL] = { 0 };
+
+G_DEFINE_TYPE (GpkDbusMonitor, egg_dbus_monitor, G_TYPE_OBJECT)
+
+/**
+ * egg_dbus_monitor_name_owner_changed_cb:
+ **/
+static void
+egg_dbus_monitor_name_owner_changed_cb (DBusGProxy *proxy, const gchar *name,
+ const gchar *prev, const gchar *new,
+ EggDbusMonitor *monitor)
+{
+ guint new_len;
+ guint prev_len;
+
+ g_return_if_fail (EGG_IS_DBUS_MONITOR (monitor));
+ if (monitor->priv->proxy == NULL)
+ return;
+
+ /* not us */
+ if (strcmp (name, monitor->priv->service) != 0)
+ return;
+
+ /* ITS4: ignore, not used for allocation */
+ new_len = strlen (new);
+ /* ITS4: ignore, not used for allocation */
+ prev_len = strlen (prev);
+
+ /* something --> nothing */
+ if (prev_len != 0 && new_len == 0) {
+ g_signal_emit (monitor, signals [EGG_DBUS_MONITOR_CONNECTION_CHANGED], 0, FALSE);
+ return;
+ }
+
+ /* nothing --> something */
+ if (prev_len == 0 && new_len != 0) {
+ g_signal_emit (monitor, signals [EGG_DBUS_MONITOR_CONNECTION_CHANGED], 0, TRUE);
+ return;
+ }
+
+ /* something --> something (we've replaced the old process) */
+ if (prev_len != 0 && new_len != 0) {
+ /* only send this to the prev client */
+ if (strcmp (monitor->priv->unique_name, prev) == 0)
+ g_signal_emit (monitor, signals [EGG_DBUS_MONITOR_CONNECTION_REPLACED], 0);
+ return;
+ }
+}
+
+/**
+ * egg_dbus_monitor_assign:
+ * @monitor: This class instance
+ * @bus_type: The bus type, either EGG_DBUS_MONITOR_SESSION or EGG_DBUS_MONITOR_SYSTEM
+ * @service: The EGG_DBUS_MONITOR service name
+ * Return value: success
+ *
+ * Emits connection-changed(TRUE) if connection is alive - this means you
+ * have to connect up the callback before this function is called.
+ **/
+gboolean
+egg_dbus_monitor_assign (EggDbusMonitor *monitor, EggDbusMonitorType bus_type, const gchar *service)
+{
+ GError *error = NULL;
+ gboolean connected;
+ DBusConnection *conn;
+
+ g_return_val_if_fail (EGG_IS_DBUS_MONITOR (monitor), FALSE);
+ g_return_val_if_fail (service != NULL, FALSE);
+
+ if (monitor->priv->proxy != NULL) {
+ egg_warning ("already assigned!");
+ return FALSE;
+ }
+
+ monitor->priv->service = g_strdup (service);
+ monitor->priv->bus_type = bus_type;
+
+ /* connect to correct bus */
+ if (bus_type == EGG_DBUS_MONITOR_SESSION)
+ monitor->priv->connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
+ else
+ monitor->priv->connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
+ if (error != NULL) {
+ egg_warning ("Cannot connect to bus: %s", error->message);
+ g_error_free (error);
+ return FALSE;
+ }
+ monitor->priv->proxy = dbus_g_proxy_new_for_name_owner (monitor->priv->connection,
+ DBUS_SERVICE_DBUS,
+ DBUS_PATH_DBUS,
+ DBUS_INTERFACE_DBUS,
+ &error);
+ if (error != NULL) {
+ egg_warning ("Cannot connect to DBUS: %s", error->message);
+ g_error_free (error);
+ return FALSE;
+ }
+ dbus_g_proxy_add_signal (monitor->priv->proxy, "NameOwnerChanged",
+ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal (monitor->priv->proxy, "NameOwnerChanged",
+ G_CALLBACK (egg_dbus_monitor_name_owner_changed_cb),
+ monitor, NULL);
+
+ /* coldplug */
+ connected = egg_dbus_monitor_is_connected (monitor);
+ if (connected)
+ g_signal_emit (monitor, signals [EGG_DBUS_MONITOR_CONNECTION_CHANGED], 0, TRUE);
+
+ /* save this for the replaced check */
+ conn = dbus_g_connection_get_connection (monitor->priv->connection);
+ monitor->priv->unique_name = dbus_bus_get_unique_name (conn);
+ return TRUE;
+}
+
+/**
+ * egg_dbus_monitor_is_connected:
+ * @monitor: This class instance
+ * Return value: if we are connected to a valid watch
+ **/
+gboolean
+egg_dbus_monitor_is_connected (EggDbusMonitor *monitor)
+{
+ DBusError error;
+ DBusConnection *conn;
+ gboolean ret;
+ g_return_val_if_fail (EGG_IS_DBUS_MONITOR (monitor), FALSE);
+
+ /* get raw connection */
+ conn = dbus_g_connection_get_connection (monitor->priv->connection);
+ dbus_error_init (&error);
+ ret = dbus_bus_name_has_owner (conn, monitor->priv->service, &error);
+ if (dbus_error_is_set (&error)) {
+ egg_debug ("error: %s", error.message);
+ dbus_error_free (&error);
+ }
+
+ return ret;
+}
+
+/**
+ * egg_dbus_monitor_get_service:
+ * @monitor: This class instance
+ * Return value: the service name being monitored
+ **/
+const gchar *
+egg_dbus_monitor_get_service (EggDbusMonitor *monitor)
+{
+ g_return_val_if_fail (EGG_IS_DBUS_MONITOR (monitor), FALSE);
+
+ return monitor->priv->service;
+}
+
+/**
+ * egg_dbus_monitor_class_init:
+ * @klass: The EggDbusMonitorClass
+ **/
+static void
+egg_dbus_monitor_class_init (EggDbusMonitorClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = egg_dbus_monitor_finalize;
+ g_type_class_add_private (klass, sizeof (EggDbusMonitorPrivate));
+ signals [EGG_DBUS_MONITOR_CONNECTION_CHANGED] =
+ g_signal_new ("connection-changed",
+ G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EggDbusMonitorClass, connection_changed),
+ NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN,
+ G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
+ signals [EGG_DBUS_MONITOR_CONNECTION_REPLACED] =
+ g_signal_new ("connection-replaced",
+ G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EggDbusMonitorClass, connection_replaced),
+ NULL, NULL, g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+}
+
+/**
+ * egg_dbus_monitor_init:
+ * @monitor: This class instance
+ **/
+static void
+egg_dbus_monitor_init (EggDbusMonitor *monitor)
+{
+ monitor->priv = EGG_DBUS_MONITOR_GET_PRIVATE (monitor);
+ monitor->priv->service = NULL;
+ monitor->priv->bus_type = EGG_DBUS_MONITOR_SESSION;
+ monitor->priv->proxy = NULL;
+}
+
+/**
+ * egg_dbus_monitor_finalize:
+ * @object: The object to finalize
+ **/
+static void
+egg_dbus_monitor_finalize (GObject *object)
+{
+ EggDbusMonitor *monitor;
+
+ g_return_if_fail (EGG_IS_DBUS_MONITOR (object));
+
+ monitor = EGG_DBUS_MONITOR (object);
+
+ g_return_if_fail (monitor->priv != NULL);
+ if (monitor->priv->proxy != NULL)
+ g_object_unref (monitor->priv->proxy);
+
+ G_OBJECT_CLASS (egg_dbus_monitor_parent_class)->finalize (object);
+}
+
+/**
+ * egg_dbus_monitor_new:
+ *
+ * Return value: a new EggDbusMonitor object.
+ **/
+EggDbusMonitor *
+egg_dbus_monitor_new (void)
+{
+ EggDbusMonitor *monitor;
+ monitor = g_object_new (EGG_TYPE_DBUS_MONITOR, NULL);
+ return EGG_DBUS_MONITOR (monitor);
+}
+
Added: trunk/src/egg-dbus-monitor.h
==============================================================================
--- (empty file)
+++ trunk/src/egg-dbus-monitor.h Fri Nov 21 10:09:56 2008
@@ -0,0 +1,73 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __EGG_DBUS_MONITOR_H
+#define __EGG_DBUS_MONITOR_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define EGG_TYPE_DBUS_MONITOR (egg_dbus_monitor_get_type ())
+#define EGG_DBUS_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EGG_TYPE_DBUS_MONITOR, EggDbusMonitor))
+#define EGG_DBUS_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EGG_TYPE_DBUS_MONITOR, EggDbusMonitorClass))
+#define EGG_IS_DBUS_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EGG_TYPE_DBUS_MONITOR))
+#define EGG_IS_DBUS_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EGG_TYPE_DBUS_MONITOR))
+#define EGG_DBUS_MONITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EGG_TYPE_DBUS_MONITOR, EggDbusMonitorClass))
+#define EGG_DBUS_MONITOR_ERROR (egg_dbus_monitor_error_quark ())
+#define EGG_DBUS_MONITOR_TYPE_ERROR (egg_dbus_monitor_error_get_type ())
+
+typedef struct EggDbusMonitorPrivate EggDbusMonitorPrivate;
+
+typedef struct
+{
+ GObject parent;
+ EggDbusMonitorPrivate *priv;
+} EggDbusMonitor;
+
+typedef struct
+{
+ GObjectClass parent_class;
+ void (* connection_changed) (EggDbusMonitor *watch,
+ gboolean connected);
+ void (* connection_replaced) (EggDbusMonitor *watch);
+} EggDbusMonitorClass;
+
+typedef EggDbusMonitor GpkDbusMonitor;
+typedef EggDbusMonitorClass GpkDbusMonitorClass;
+
+typedef enum {
+ EGG_DBUS_MONITOR_SESSION,
+ EGG_DBUS_MONITOR_SYSTEM
+} EggDbusMonitorType;
+
+GType egg_dbus_monitor_get_type (void) G_GNUC_CONST;
+EggDbusMonitor *egg_dbus_monitor_new (void);
+gboolean egg_dbus_monitor_assign (EggDbusMonitor *monitor,
+ EggDbusMonitorType bus_type,
+ const gchar *service);
+const gchar *egg_dbus_monitor_get_service (EggDbusMonitor *monitor);
+gboolean egg_dbus_monitor_is_connected (EggDbusMonitor *monitor);
+
+G_END_DECLS
+
+#endif /* __EGG_DBUS_MONITOR_H */
+
Added: trunk/src/egg-debug.c
==============================================================================
--- (empty file)
+++ trunk/src/egg-debug.c Fri Nov 21 10:09:56 2008
@@ -0,0 +1,308 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007-2008 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:egg-debug
+ * @short_description: Debugging functions
+ *
+ * This file contains functions that can be used for debugging.
+ */
+
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <glib/gprintf.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <time.h>
+#include <execinfo.h>
+
+#include "egg-debug.h"
+
+#define CONSOLE_RESET 0
+#define CONSOLE_BLACK 30
+#define CONSOLE_RED 31
+#define CONSOLE_GREEN 32
+#define CONSOLE_YELLOW 33
+#define CONSOLE_BLUE 34
+#define CONSOLE_MAGENTA 35
+#define CONSOLE_CYAN 36
+#define CONSOLE_WHITE 37
+
+static gint fd = -1;
+
+/**
+ * pk_set_console_mode:
+ **/
+static void
+pk_set_console_mode (guint console_code)
+{
+ gchar command[13];
+
+ /* don't put extra commands into logs */
+ if (!egg_debug_is_console ())
+ return;
+
+ /* Command is the control command to the terminal */
+ g_snprintf (command, 13, "%c[%dm", 0x1B, console_code);
+ printf ("%s", command);
+}
+
+/**
+ * egg_debug_backtrace:
+ **/
+void
+egg_debug_backtrace (void)
+{
+ void *call_stack[512];
+ int call_stack_size;
+ char **symbols;
+ int i = 1;
+
+ call_stack_size = backtrace (call_stack, G_N_ELEMENTS (call_stack));
+ symbols = backtrace_symbols (call_stack, call_stack_size);
+ if (symbols != NULL) {
+ pk_set_console_mode (CONSOLE_RED);
+ g_print ("Traceback:\n");
+ while (i < call_stack_size) {
+ g_print ("\t%s\n", symbols[i]);
+ i++;
+ }
+ pk_set_console_mode (CONSOLE_RESET);
+ free (symbols);
+ }
+}
+
+/**
+ * pk_log_line:
+ **/
+static void
+pk_log_line (const gchar *buffer)
+{
+ ssize_t count;
+ /* open a file */
+ if (fd == -1) {
+ /* ITS4: ignore, /var/log/foo is owned by root, and this is just debug text */
+ fd = open (EGG_LOG_FILE, O_WRONLY|O_APPEND|O_CREAT, 0777);
+ if (fd == -1)
+ g_error ("could not open log: '%s'", EGG_LOG_FILE);
+ }
+
+ /* ITS4: ignore, debug text always NULL terminated */
+ count = write (fd, buffer, strlen (buffer));
+ if (count == -1)
+ g_warning ("could not write %s", buffer);
+ /* newline */
+ count = write (fd, "\n", 1);
+ if (count == -1)
+ g_warning ("could not write newline");
+}
+
+/**
+ * pk_print_line:
+ **/
+static void
+pk_print_line (const gchar *func, const gchar *file, const int line, const gchar *buffer, guint color)
+{
+ gchar *str_time;
+ gchar *header;
+ time_t the_time;
+ GThread *thread;
+
+ time (&the_time);
+ str_time = g_new0 (gchar, 255);
+ strftime (str_time, 254, "%H:%M:%S", localtime (&the_time));
+ thread = g_thread_self ();
+
+ /* generate header text */
+ header = g_strdup_printf ("TI:%s\tTH:%p\tFI:%s\tFN:%s,%d", str_time, thread, file, func, line);
+ g_free (str_time);
+
+ /* always in light green */
+ pk_set_console_mode (CONSOLE_GREEN);
+ printf ("%s\n", header);
+
+ /* different colors according to the severity */
+ pk_set_console_mode (color);
+ printf (" - %s\n", buffer);
+ pk_set_console_mode (CONSOLE_RESET);
+
+ /* log to a file */
+ if (egg_debug_is_logging ()) {
+ pk_log_line (header);
+ pk_log_line (buffer);
+ }
+
+ /* flush this output, as we need to debug */
+ fflush (stdout);
+
+ g_free (header);
+}
+
+/**
+ * egg_debug_real:
+ **/
+void
+egg_debug_real (const gchar *func, const gchar *file, const int line, const gchar *format, ...)
+{
+ va_list args;
+ gchar *buffer = NULL;
+
+ if (!egg_debug_enabled ())
+ return;
+
+ va_start (args, format);
+ g_vasprintf (&buffer, format, args);
+ va_end (args);
+
+ pk_print_line (func, file, line, buffer, CONSOLE_BLUE);
+
+ g_free(buffer);
+}
+
+/**
+ * egg_warning_real:
+ **/
+void
+egg_warning_real (const gchar *func, const gchar *file, const int line, const gchar *format, ...)
+{
+ va_list args;
+ gchar *buffer = NULL;
+
+ if (!egg_debug_enabled ())
+ return;
+
+ va_start (args, format);
+ g_vasprintf (&buffer, format, args);
+ va_end (args);
+
+ /* do extra stuff for a warning */
+ if (!egg_debug_is_console ())
+ printf ("*** WARNING ***\n");
+ pk_print_line (func, file, line, buffer, CONSOLE_RED);
+
+ g_free(buffer);
+}
+
+/**
+ * egg_error_real:
+ **/
+void
+egg_error_real (const gchar *func, const gchar *file, const int line, const gchar *format, ...)
+{
+ va_list args;
+ gchar *buffer = NULL;
+
+ va_start (args, format);
+ g_vasprintf (&buffer, format, args);
+ va_end (args);
+
+ /* do extra stuff for a warning */
+ if (!egg_debug_is_console ())
+ printf ("*** ERROR ***\n");
+ pk_print_line (func, file, line, buffer, CONSOLE_RED);
+ g_free(buffer);
+
+ /* we want to fix this! */
+ egg_debug_backtrace ();
+
+ exit (1);
+}
+
+/**
+ * egg_debug_enabled:
+ *
+ * Returns: TRUE if we have debugging enabled
+ **/
+gboolean
+egg_debug_enabled (void)
+{
+ const gchar *env;
+ env = g_getenv (EGG_VERBOSE);
+ return (g_strcmp0 (env, "1") == 0);
+}
+
+/**
+ * egg_debug_is_logging:
+ *
+ * Returns: TRUE if we have logging enabled
+ **/
+gboolean
+egg_debug_is_logging (void)
+{
+ const gchar *env;
+ env = g_getenv (EGG_LOGGING);
+ return (g_strcmp0 (env, "1") == 0);
+}
+
+/**
+ * egg_debug_is_console:
+ *
+ * Returns: TRUE if we have debugging enabled
+ **/
+gboolean
+egg_debug_is_console (void)
+{
+ const gchar *env;
+ env = g_getenv (EGG_CONSOLE);
+ return (g_strcmp0 (env, "1") == 0);
+}
+
+/**
+ * egg_debug_set_logging:
+ **/
+void
+egg_debug_set_logging (gboolean enabled)
+{
+ if (enabled)
+ g_setenv (EGG_LOGGING, "1", TRUE);
+ else
+ g_setenv (EGG_LOGGING, "0", TRUE);
+
+ if (egg_debug_is_logging ())
+ egg_debug ("logging to %s", EGG_LOG_FILE);
+}
+
+/**
+ * egg_debug_init:
+ * @debug: If we should print out verbose logging
+ **/
+void
+egg_debug_init (gboolean debug)
+{
+ /* check if we are on console */
+ if (isatty (fileno (stdout)) == 1)
+ g_setenv (EGG_CONSOLE, "1", FALSE);
+ else
+ g_setenv (EGG_CONSOLE, "0", FALSE);
+ if (debug)
+ g_setenv (EGG_VERBOSE, "1", FALSE);
+ else
+ g_setenv (EGG_VERBOSE, "0", FALSE);
+ egg_debug ("Verbose debugging %i (on console %i)%s", egg_debug_enabled (), egg_debug_is_console (), EGG_VERBOSE);
+}
+
Added: trunk/src/egg-debug.h
==============================================================================
--- (empty file)
+++ trunk/src/egg-debug.h Fri Nov 21 10:09:56 2008
@@ -0,0 +1,83 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007-2008 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __EGG_DEBUG_H
+#define __EGG_DEBUG_H
+
+#include <stdarg.h>
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+/**
+ * egg_debug:
+ *
+ * Non critical debugging
+ */
+#define egg_debug(...) egg_debug_real (__func__, __FILE__, __LINE__, __VA_ARGS__)
+
+/**
+ * egg_warning:
+ *
+ * Important debugging
+ */
+#define egg_warning(...) egg_warning_real (__func__, __FILE__, __LINE__, __VA_ARGS__)
+
+/**
+ * egg_error:
+ *
+ * Critical debugging, with exit
+ */
+#define egg_error(...) egg_error_real (__func__, __FILE__, __LINE__, __VA_ARGS__)
+
+#elif defined(__GNUC__) && __GNUC__ >= 3
+#define egg_debug(...) egg_debug_real (__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
+#define egg_warning(...) egg_warning_real (__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
+#define egg_error(...) egg_error_real (__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
+#else
+#define egg_debug(...)
+#define egg_warning(...)
+#define egg_error(...)
+#endif
+
+void egg_debug_init (gboolean debug);
+void egg_debug_set_logging (gboolean enabled);
+gboolean egg_debug_enabled (void);
+gboolean egg_debug_is_logging (void);
+gboolean egg_debug_is_console (void);
+void egg_debug_backtrace (void);
+void egg_debug_real (const gchar *func,
+ const gchar *file,
+ int line,
+ const gchar *format, ...) __attribute__((format (printf,4,5)));
+void egg_warning_real (const gchar *func,
+ const gchar *file,
+ int line,
+ const gchar *format, ...) __attribute__((format (printf,4,5)));
+void egg_error_real (const gchar *func,
+ const gchar *file,
+ int line,
+ const gchar *format, ...) __attribute__((format (printf,4,5)));
+
+G_END_DECLS
+
+#endif /* __EGG_DEBUG_H */
Added: trunk/src/egg-string-list.c
==============================================================================
--- (empty file)
+++ trunk/src/egg-string-list.c Fri Nov 21 10:09:56 2008
@@ -0,0 +1,228 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+#include <glib.h>
+
+#include "egg-debug.h"
+#include "egg-string.h"
+#include "egg-string-list.h"
+
+/**
+ * egg_str_list_new:
+ **/
+inline EggStrList *
+egg_str_list_new (void)
+{
+ return g_ptr_array_new ();
+}
+
+/**
+ * egg_str_list_free:
+ **/
+inline void
+egg_str_list_free (EggStrList *list)
+{
+ g_ptr_array_foreach (list, (GFunc) g_free, NULL);
+ g_ptr_array_free (list, TRUE);
+}
+
+/**
+ * egg_str_list_add:
+ **/
+inline void
+egg_str_list_add (EggStrList *list, const gchar *data)
+{
+ g_ptr_array_add (list, g_strdup (data));
+}
+
+/**
+ * egg_str_list_add_strv:
+ **/
+void
+egg_str_list_add_strv (EggStrList *list, gchar **data)
+{
+ guint i;
+ guint len;
+ len = g_strv_length (data);
+ for (i=0; i<len; i++)
+ g_ptr_array_add (list, g_strdup (data[i]));
+}
+
+/**
+ * egg_str_list_index:
+ **/
+inline const gchar *
+egg_str_list_index (EggStrList *list, guint index)
+{
+ return (const gchar *) g_ptr_array_index (list, index);
+}
+
+/**
+ * egg_str_list_print:
+ **/
+void
+egg_str_list_print (EggStrList *list)
+{
+ guint i;
+ const gchar *data;
+
+ for (i=0; i<list->len; i++) {
+ data = egg_str_list_index (list, i);
+ egg_debug ("list[%i] = %s", i, data);
+ }
+}
+
+/**
+ * egg_str_list_remove:
+ **/
+gboolean
+egg_str_list_remove (EggStrList *list, const gchar *data)
+{
+ guint i;
+ gchar *data_tmp;
+ gboolean ret = FALSE;
+
+ for (i=0; i<list->len; i++) {
+ data_tmp = (gchar *) g_ptr_array_index (list, i);
+ if (egg_strequal (data, data_tmp)) {
+ g_free (data_tmp);
+ g_ptr_array_remove_index (list, i);
+ ret = TRUE;
+ }
+ }
+ return ret;
+}
+
+/**
+ * egg_str_list_add_list:
+ **/
+void
+egg_str_list_add_list (EggStrList *list, EggStrList *add)
+{
+ guint i;
+ const gchar *data;
+ for (i=0; i<add->len; i++) {
+ data = egg_str_list_index (add, i);
+ egg_str_list_add (list, data);
+ }
+}
+
+/**
+ * egg_str_list_remove_list:
+ **/
+void
+egg_str_list_remove_list (EggStrList *list, EggStrList *remove)
+{
+ guint i;
+ const gchar *data;
+ for (i=0; i<remove->len; i++) {
+ data = egg_str_list_index (remove, i);
+ egg_str_list_remove (list, data);
+ }
+}
+
+/**
+ * egg_str_list_remove_duplicate:
+ * @array: A GPtrArray instance
+ **/
+void
+egg_str_list_remove_duplicate (EggStrList *list)
+{
+ guint i, j;
+ gchar *data1;
+ const gchar *data2;
+
+ for (i=0; i<list->len; i++) {
+ data1 = (gchar *) g_ptr_array_index (list, i);
+ for (j=0; j<list->len; j++) {
+ if (i == j)
+ break;
+ data2 = egg_str_list_index (list, j);
+ if (egg_strequal (data1, data2)) {
+ g_free (data1);
+ g_ptr_array_remove_index (list, i);
+ }
+ }
+ }
+}
+
+/***************************************************************************
+ *** MAKE CHECK TESTS ***
+ ***************************************************************************/
+#ifdef EGG_TEST
+#include "egg-test.h"
+
+void
+egg_string_list_test (EggTest *test)
+{
+ EggStrList *list;
+ EggStrList *list2;
+
+ if (!egg_test_start (test, "EggStrList"))
+ return;
+
+ /************************************************************/
+ egg_test_title (test, "create new list");
+ list = egg_str_list_new ();
+ egg_test_assert (test, list != NULL);
+
+ /************************************************************/
+ egg_test_title (test, "length zero");
+ egg_test_assert (test, list->len == 0);
+
+ /************************************************************/
+ egg_test_title (test, "add stuff to list");
+ egg_str_list_add (list, "dave");
+ egg_str_list_add (list, "mark");
+ egg_str_list_add (list, "foo");
+ egg_str_list_add (list, "foo");
+ egg_str_list_add (list, "bar");
+ egg_test_assert (test, list->len == 5);
+
+ /************************************************************/
+ egg_test_title (test, "create second list");
+ list2 = egg_str_list_new ();
+ egg_str_list_add (list2, "mark");
+ egg_test_assert (test, list2->len == 1);
+
+ /************************************************************/
+ egg_test_title (test, "append the lists");
+ egg_str_list_add_list (list, list2);
+ egg_test_assert (test, list->len == 6);
+
+ /************************************************************/
+ egg_test_title (test, "remove duplicates");
+ egg_str_list_remove_duplicate (list);
+ egg_test_assert (test, list->len == 4);
+
+ /************************************************************/
+ egg_test_title (test, "remove one list from another");
+ egg_str_list_add_list (list, list2); //dave,mark,foo,bar,mark
+ egg_str_list_remove_list (list, list2);
+ egg_test_assert (test, list->len == 3);
+
+ egg_str_list_free (list2);
+ egg_str_list_free (list);
+ egg_test_end (test);
+}
+#endif
+
Added: trunk/src/egg-string-list.h
==============================================================================
--- (empty file)
+++ trunk/src/egg-string-list.h Fri Nov 21 10:09:56 2008
@@ -0,0 +1,50 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __EGG_STRING_LIST_H
+#define __EGG_STRING_LIST_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+typedef GPtrArray EggStrList;
+
+EggStrList *egg_str_list_new (void);
+void egg_str_list_free (EggStrList *list);
+void egg_str_list_add (EggStrList *list,
+ const gchar *data);
+void egg_str_list_add_strv (EggStrList *list,
+ gchar **data);
+const gchar *egg_str_list_index (EggStrList *list,
+ guint index);
+void egg_str_list_print (EggStrList *list);
+gboolean egg_str_list_remove (EggStrList *list,
+ const gchar *data);
+void egg_str_list_remove_duplicate (EggStrList *list);
+void egg_str_list_add_list (EggStrList *list,
+ EggStrList *add);
+void egg_str_list_remove_list (EggStrList *list,
+ EggStrList *remove);
+
+G_END_DECLS
+
+#endif /* __EGG_STRING_LIST_H */
Added: trunk/src/egg-string.c
==============================================================================
--- (empty file)
+++ trunk/src/egg-string.c Fri Nov 21 10:09:56 2008
@@ -0,0 +1,540 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007-2008 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:pk-common
+ * @short_description: Common utility functions for PackageKit
+ *
+ * This file contains functions that may be useful.
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <string.h>
+#include <sys/types.h>
+#include <sys/utsname.h>
+#include <sys/stat.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#include <glib.h>
+
+#include "egg-debug.h"
+#include "egg-string.h"
+
+/**
+ * egg_strnumber:
+ * @text: The text the validate
+ *
+ * Tests a string to see if it is a number. Both positive and negative numbers
+ * are allowed.
+ *
+ * Return value: %TRUE if the string represents a numeric value
+ **/
+gboolean
+egg_strnumber (const gchar *text)
+{
+ guint i;
+ guint length;
+
+ /* check explicitly */
+ if (egg_strzero (text))
+ return FALSE;
+
+ /* max length is 10 */
+ length = egg_strlen (text, 10);
+ if (length == 10) {
+ egg_warning ("input too long: %s", text);
+ return FALSE;
+ }
+
+ for (i=0; i<length; i++) {
+ if (i == 0 && text[i] == '-') {
+ /* negative sign */
+ } else if (g_ascii_isdigit (text[i]) == FALSE) {
+ egg_warning ("not a number '%c' in text!", text[i]);
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
+/**
+ * egg_strtoint:
+ * @text: The text the convert
+ * @value: The return numeric return value, or 0 if invalid.
+ *
+ * Converts a string into a signed integer value in a safe way.
+ *
+ * Return value: %TRUE if the string was converted correctly
+ **/
+gboolean
+egg_strtoint (const gchar *text, gint *value)
+{
+ gboolean ret;
+ ret = egg_strnumber (text);
+ if (!ret) {
+ *value = 0;
+ return FALSE;
+ }
+ /* ITS4: ignore, we've already checked for validity */
+ *value = atoi (text);
+ return TRUE;
+}
+
+/**
+ * egg_strtouint:
+ * @text: The text the convert
+ * @value: The return numeric return value, or 0 if invalid.
+ *
+ * Converts a string into a unsigned integer value in a safe way.
+ *
+ * Return value: %TRUE if the string was converted correctly
+ **/
+gboolean
+egg_strtouint (const gchar *text, guint *value)
+{
+ gboolean ret;
+ gint temp;
+ ret = egg_strtoint (text, &temp);
+ if (ret == FALSE || temp < 0) {
+ *value = 0;
+ return FALSE;
+ }
+ *value = (guint) temp;
+ return TRUE;
+}
+
+/**
+ * egg_strzero:
+ * @text: The text to check
+ *
+ * This function is a much safer way of doing "if (strlen (text) == 0))"
+ * as it does not rely on text being NULL terminated. It's also much
+ * quicker as it only checks the first byte rather than scanning the whole
+ * string just to verify it's not zero length.
+ *
+ * Return value: %TRUE if the string was converted correctly
+ **/
+gboolean
+egg_strzero (const gchar *text)
+{
+ if (text == NULL)
+ return TRUE;
+ if (text[0] == '\0')
+ return TRUE;
+ return FALSE;
+}
+
+/**
+ * egg_strlen:
+ * @text: The text to check
+ * @len: The maximum length of the string
+ *
+ * This function is a much safer way of doing strlen as it checks for NULL and
+ * a stupidly long string.
+ *
+ * Return value: the length of the string, or len if the string is too long.
+ **/
+guint
+egg_strlen (const gchar *text, guint len)
+{
+ guint i;
+
+ /* common case */
+ if (text == NULL || text[0] == '\0')
+ return 0;
+
+ /* only count up to len */
+ for (i=1; i<len; i++) {
+ if (text[i] == '\0')
+ break;
+ }
+ return i;
+}
+
+/**
+ * egg_strequal:
+ * @id1: the first item of text to test
+ * @id2: the second item of text to test
+ *
+ * This function is a much safer way of doing strcmp as it checks for
+ * NULL first, and returns boolean TRUE, not zero for success.
+ *
+ * Return value: %TRUE if the string are both non-%NULL and the same.
+ **/
+gboolean
+egg_strequal (const gchar *id1, const gchar *id2)
+{
+ if (id1 == NULL || id2 == NULL)
+ return FALSE;
+ return (strcmp (id1, id2) == 0);
+}
+
+/**
+ * egg_strvequal:
+ * @id1: the first item of text to test
+ * @id2: the second item of text to test
+ *
+ * This function will check to see if the GStrv arrays are string equal
+ *
+ * Return value: %TRUE if the arrays are the same, or are both %NULL
+ **/
+gboolean
+egg_strvequal (gchar **id1, gchar **id2)
+{
+ guint i;
+ guint length1;
+ guint length2;
+
+ if (id1 == NULL && id2 == NULL)
+ return TRUE;
+
+ if (id1 == NULL || id2 == NULL) {
+ egg_debug ("GStrv compare invalid '%p' and '%p'", id1, id2);
+ return FALSE;
+ }
+
+ /* check different sizes */
+ length1 = g_strv_length (id1);
+ length2 = g_strv_length (id2);
+ if (length1 != length2)
+ return FALSE;
+
+ /* text equal each one */
+ for (i=0; i<length1; i++) {
+ if (!egg_strequal (id1[i], id2[i]))
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/**
+ * egg_strreplace:
+ * @text: The input text to make safe
+ * @find: What to search for
+ * @replace: What to replace with
+ *
+ * Replaces chars in the text with a replacement.
+ * The %find and %replace variables to not have to be of the same length
+ *
+ * Return value: the new string (copied)
+ **/
+gchar *
+egg_strreplace (const gchar *text, const gchar *find, const gchar *replace)
+{
+ gchar **array;
+ gchar *retval;
+
+ /* common case, not found */
+ if (strstr (text, find) == NULL) {
+ return g_strdup (text);
+ }
+
+ /* split apart and rejoin with new delimiter */
+ array = g_strsplit (text, find, 0);
+ retval = g_strjoinv (replace, array);
+ g_strfreev (array);
+ return retval;
+}
+
+/***************************************************************************
+ *** MAKE CHECK TESTS ***
+ ***************************************************************************/
+#ifdef EGG_TEST
+#include "egg-test.h"
+
+void
+egg_string_test (EggTest *test)
+{
+ gboolean ret;
+ gchar *text_safe;
+ const gchar *temp;
+ guint length;
+ gint value;
+ guint uvalue;
+ gchar **id1;
+ gchar **id2;
+
+ if (!egg_test_start (test, "EggString"))
+ return;
+
+ /************************************************************
+ **************** String equal ******************
+ ************************************************************/
+ egg_test_title (test, "egg_strequal same argument");
+ temp = "dave";
+ if (egg_strequal (temp, temp))
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "incorrect ret when both same");
+
+ /************************************************************/
+ egg_test_title (test, "egg_strequal both const");
+ if (egg_strequal ("dave", "dave"))
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "incorrect ret when both same");
+
+ /************************************************************
+ **************** String array equal ******************
+ ************************************************************/
+ egg_test_title (test, "egg_strvequal same argument");
+ id1 = g_strsplit ("the quick brown fox", " ", 0);
+ if (egg_strvequal (id1, id1))
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "incorrect ret when both same");
+ g_strfreev (id1);
+
+ /************************************************************/
+ egg_test_title (test, "egg_strvequal same");
+ id1 = g_strsplit ("the quick brown fox", " ", 0);
+ id2 = g_strsplit ("the quick brown fox", " ", 0);
+ if (egg_strvequal (id1, id2))
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "incorrect ret when both same");
+ g_strfreev (id1);
+ g_strfreev (id2);
+
+ /************************************************************/
+ egg_test_title (test, "egg_strvequal different lengths");
+ id1 = g_strsplit ("the quick brown", " ", 0);
+ id2 = g_strsplit ("the quick brown fox", " ", 0);
+ if (!egg_strvequal (id1, id2))
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "incorrect ret when both same");
+ g_strfreev (id1);
+ g_strfreev (id2);
+
+ /************************************************************/
+ egg_test_title (test, "egg_strvequal different");
+ id1 = g_strsplit ("the quick brown fox", " ", 0);
+ id2 = g_strsplit ("richard hughes maintainer dude", " ", 0);
+ if (!egg_strvequal (id1, id2))
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "same when different");
+ g_strfreev (id1);
+ g_strfreev (id2);
+
+ /************************************************************
+ **************** Zero ******************
+ ************************************************************/
+ temp = NULL;
+ egg_test_title (test, "test strzero (null)");
+ ret = egg_strzero (NULL);
+ if (ret)
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "failed null");
+
+ /************************************************************/
+ egg_test_title (test, "test strzero (null first char)");
+ ret = egg_strzero ("");
+ if (ret)
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "failed null");
+
+ /************************************************************/
+ egg_test_title (test, "test strzero (long string)");
+ ret = egg_strzero ("Richard");
+ if (!ret)
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "zero length word!");
+
+ /************************************************************/
+ egg_test_title (test, "id strcmp pass");
+ ret = egg_strequal ("moo;0.0.1;i386;fedora", "moo;0.0.1;i386;fedora");
+ egg_test_assert (test, ret);
+
+ /************************************************************/
+ egg_test_title (test, "id strcmp fail");
+ ret = egg_strequal ("moo;0.0.1;i386;fedora", "moo;0.0.2;i386;fedora");
+ egg_test_assert (test, !ret);
+
+ /************************************************************
+ **************** strlen ******************
+ ************************************************************/
+ egg_test_title (test, "strlen bigger");
+ length = egg_strlen ("123456789", 20);
+ if (length == 9)
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "failed the strlen %i", length);
+
+ /************************************************************/
+ egg_test_title (test, "strlen smaller");
+ length = egg_strlen ("123456789", 5);
+ if (length == 5)
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "failed the strlen %i", length);
+
+ /************************************************************/
+ egg_test_title (test, "strlen correct");
+ length = egg_strlen ("123456789", 9);
+ if (length == 9)
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "failed the strlen %i", length);
+
+ /************************************************************
+ **************** Replace ******************
+ ************************************************************/
+ egg_test_title (test, "replace start");
+ text_safe = egg_strreplace ("richard\nhughes", "r", "e");
+ if (egg_strequal (text_safe, "eichaed\nhughes"))
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "failed the replace '%s'", text_safe);
+ g_free (text_safe);
+
+ /************************************************************/
+ egg_test_title (test, "replace none");
+ text_safe = egg_strreplace ("richard\nhughes", "dave", "e");
+ if (egg_strequal (text_safe, "richard\nhughes"))
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "failed the replace '%s'", text_safe);
+ g_free (text_safe);
+
+ /************************************************************/
+ egg_test_title (test, "replace end");
+ text_safe = egg_strreplace ("richard\nhughes", "s", "e");
+ if (egg_strequal (text_safe, "richard\nhughee"))
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "failed the replace '%s'", text_safe);
+ g_free (text_safe);
+
+ /************************************************************/
+ egg_test_title (test, "replace unicode");
+ text_safe = egg_strreplace ("richard\n- hughes", "\n- ", "\nâ ");
+ if (egg_strequal (text_safe, "richard\nâ hughes"))
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "failed the replace '%s'", text_safe);
+ g_free (text_safe);
+
+ /************************************************************
+ ************** Check for numbers ****************
+ ************************************************************/
+ egg_test_title (test, "check number valid");
+ ret = egg_strnumber ("123");
+ egg_test_assert (test, ret);
+
+ /************************************************************/
+ egg_test_title (test, "check number valid");
+ ret = egg_strnumber ("-123");
+ egg_test_assert (test, ret);
+
+ /************************************************************/
+ egg_test_title (test, "check number zero");
+ ret = egg_strnumber ("0");
+ egg_test_assert (test, ret);
+
+ /************************************************************/
+ egg_test_title (test, "check number oversize");
+ ret = egg_strnumber ("123456891234");
+ egg_test_assert (test, !ret);
+
+ /************************************************************/
+ egg_test_title (test, "check number NULL");
+ ret = egg_strnumber (NULL);
+ egg_test_assert (test, !ret);
+
+ /************************************************************/
+ egg_test_title (test, "check number blank");
+ ret = egg_strnumber ("");
+ egg_test_assert (test, !ret);
+
+ /************************************************************/
+ egg_test_title (test, "check number not negative");
+ ret = egg_strnumber ("503-");
+ egg_test_assert (test, !ret);
+
+ /************************************************************/
+ egg_test_title (test, "check number positive");
+ ret = egg_strnumber ("+503");
+ egg_test_assert (test, !ret);
+
+ /************************************************************/
+ egg_test_title (test, "check number random chars");
+ ret = egg_strnumber ("dave");
+ egg_test_assert (test, !ret);
+
+ /************************************************************
+ ************** Convert numbers ****************
+ ************************************************************/
+ egg_test_title (test, "convert valid number");
+ ret = egg_strtoint ("234", &value);
+ if (ret && value == 234)
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "value is %i", value);
+
+ /************************************************************/
+ egg_test_title (test, "convert negative valid number");
+ ret = egg_strtoint ("-234", &value);
+ if (ret && value == -234)
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "value is %i", value);
+
+ /************************************************************/
+ egg_test_title (test, "don't convert invalid number");
+ ret = egg_strtoint ("dave", &value);
+ if (ret == FALSE && value == 0)
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "value is %i", value);
+
+ /************************************************************/
+ egg_test_title (test, "convert valid uint number");
+ ret = egg_strtouint ("234", &uvalue);
+ if (ret && uvalue == 234)
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "value is %i", uvalue);
+
+ /************************************************************/
+ egg_test_title (test, "convert invalid uint number");
+ ret = egg_strtouint ("-234", &uvalue);
+ if (ret == FALSE && uvalue == 0)
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, "value is %i", uvalue);
+
+ egg_test_end (test);
+}
+#endif
+
Added: trunk/src/egg-string.h
==============================================================================
--- (empty file)
+++ trunk/src/egg-string.h Fri Nov 21 10:09:56 2008
@@ -0,0 +1,52 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007-2008 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __EGG_STRING_H
+#define __EGG_STRING_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+guint egg_strlen (const gchar *text,
+ guint len)
+ G_GNUC_WARN_UNUSED_RESULT;
+gboolean egg_strzero (const gchar *text)
+ G_GNUC_WARN_UNUSED_RESULT;
+gboolean egg_strequal (const gchar *id1,
+ const gchar *id2)
+ G_GNUC_WARN_UNUSED_RESULT;
+gboolean egg_strvequal (gchar **id1,
+ gchar **id2)
+ G_GNUC_WARN_UNUSED_RESULT;
+gboolean egg_strnumber (const gchar *text)
+ G_GNUC_WARN_UNUSED_RESULT;
+gboolean egg_strtoint (const gchar *text,
+ gint *value);
+gboolean egg_strtouint (const gchar *text,
+ guint *value);
+gchar *egg_strreplace (const gchar *text,
+ const gchar *find,
+ const gchar *replace);
+
+G_END_DECLS
+
+#endif /* __EGG_STRING_H */
Added: trunk/src/egg-test.c
==============================================================================
--- (empty file)
+++ trunk/src/egg-test.c Fri Nov 21 10:09:56 2008
@@ -0,0 +1,316 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007-2008 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include <glib.h>
+#include <string.h>
+#include <glib/gi18n.h>
+#include <glib-object.h>
+#include <glib/gprintf.h>
+
+#include "egg-test.h"
+
+struct EggTest {
+ guint total;
+ guint succeeded;
+ gboolean started;
+ gchar *type;
+ GTimer *timer;
+ GMainLoop *loop;
+ guint hang_loop_id;
+ gpointer user_data;
+};
+
+/**
+ * egg_test_init:
+ **/
+EggTest *
+egg_test_init ()
+{
+ EggTest *test;
+ test = g_new (EggTest, 1);
+ test->total = 0;
+ test->succeeded = 0;
+ test->type = NULL;
+ test->started = FALSE;
+ test->timer = g_timer_new ();
+ test->loop = g_main_loop_new (NULL, FALSE);
+ test->hang_loop_id = 0;
+ return test;
+}
+
+/**
+ * egg_test_loop_quit:
+ **/
+void
+egg_test_loop_quit (EggTest *test)
+{
+ /* disable the loop watch */
+ if (test->hang_loop_id != 0) {
+ g_source_remove (test->hang_loop_id);
+ test->hang_loop_id = 0;
+ }
+ g_main_loop_quit (test->loop);
+}
+
+/**
+ * egg_test_hang_check:
+ **/
+static gboolean
+egg_test_hang_check (gpointer data)
+{
+ EggTest *test = (EggTest *) data;
+ g_main_loop_quit (test->loop);
+ return FALSE;
+}
+
+/**
+ * egg_test_loop_wait:
+ **/
+void
+egg_test_loop_wait (EggTest *test, guint timeout)
+{
+ test->hang_loop_id = g_timeout_add (timeout, egg_test_hang_check, test);
+ g_main_loop_run (test->loop);
+}
+
+/**
+ * egg_test_loop_check:
+ **/
+void
+egg_test_loop_check (EggTest *test)
+{
+ guint elapsed = egg_test_elapsed (test);
+ egg_test_title (test, "did we timeout out of the loop");
+ if (test->hang_loop_id == 0) {
+ egg_test_success (test, "loop blocked for %ims", elapsed);
+ } else {
+ egg_test_failed (test, "hangcheck saved us after %ims", elapsed);
+ }
+}
+
+/**
+ * egg_test_set_user_data:
+ **/
+void
+egg_test_set_user_data (EggTest *test, gpointer user_data)
+{
+ test->user_data = user_data;
+}
+
+/**
+ * egg_test_get_user_data:
+ **/
+gpointer
+egg_test_get_user_data (EggTest *test)
+{
+ return test->user_data;
+}
+
+/**
+ * egg_test_finish:
+ **/
+gint
+egg_test_finish (EggTest *test)
+{
+ gint retval;
+ g_print ("test passes (%u/%u) : ", test->succeeded, test->total);
+ if (test->succeeded == test->total) {
+ g_print ("ALL OKAY\n");
+ retval = 0;
+ } else {
+ g_print ("%u FAILURE(S)\n", test->total - test->succeeded);
+ retval = 1;
+ }
+
+ g_timer_destroy (test->timer);
+ g_main_loop_unref (test->loop);
+ g_free (test);
+
+ return retval;
+}
+
+/**
+ * egg_test_elapsed:
+ *
+ * Returns: time in ms
+ **/
+guint
+egg_test_elapsed (EggTest *test)
+{
+ gdouble time;
+ time = g_timer_elapsed (test->timer, NULL);
+ return (guint) (time * 1000.0f);
+}
+
+/**
+ * egg_test_start:
+ **/
+gboolean
+egg_test_start (EggTest *test, const gchar *name)
+{
+ if (test->started) {
+ g_print ("Not ended test! Cannot start!\n");
+ exit (1);
+ }
+ test->type = g_strdup (name);
+ test->started = TRUE;
+ return TRUE;
+}
+
+/**
+ * egg_test_end:
+ **/
+void
+egg_test_end (EggTest *test)
+{
+ if (test->started == FALSE) {
+ g_print ("Not started test! Cannot finish!\n");
+ exit (1);
+ }
+ g_print ("OK\n");
+
+ /* disable hang check */
+ if (test->hang_loop_id != 0) {
+ g_source_remove (test->hang_loop_id);
+ test->hang_loop_id = 0;
+ }
+
+ test->started = FALSE;
+ g_free (test->type);
+}
+
+/**
+ * egg_test_title:
+ **/
+void
+egg_test_title (EggTest *test, const gchar *format, ...)
+{
+ va_list args;
+ gchar *va_args_buffer = NULL;
+
+ /* reset the value egg_test_elapsed replies with */
+ g_timer_reset (test->timer);
+
+ va_start (args, format);
+ g_vasprintf (&va_args_buffer, format, args);
+ va_end (args);
+ g_print ("> check #%u\t%s: \t%s...", test->total+1, test->type, va_args_buffer);
+ g_free(va_args_buffer);
+
+ test->total++;
+}
+
+/**
+ * egg_test_success:
+ **/
+void
+egg_test_success (EggTest *test, const gchar *format, ...)
+{
+ va_list args;
+ gchar *va_args_buffer = NULL;
+
+ if (format == NULL) {
+ g_print ("...OK\n");
+ goto finish;
+ }
+ va_start (args, format);
+ g_vasprintf (&va_args_buffer, format, args);
+ va_end (args);
+ g_print ("...OK [%s]\n", va_args_buffer);
+ g_free(va_args_buffer);
+finish:
+ test->succeeded++;
+}
+
+/**
+ * egg_test_failed:
+ **/
+void
+egg_test_failed (EggTest *test, const gchar *format, ...)
+{
+ va_list args;
+ gchar *va_args_buffer = NULL;
+ if (format == NULL) {
+ g_print ("FAILED\n");
+ goto failed;
+ }
+ va_start (args, format);
+ g_vasprintf (&va_args_buffer, format, args);
+ va_end (args);
+ g_print ("FAILED [%s]\n", va_args_buffer);
+ g_free(va_args_buffer);
+failed:
+ exit (1);
+}
+
+/**
+ * egg_test_assert:
+ **/
+void
+egg_test_assert (EggTest *test, gboolean value)
+{
+ if (value)
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, NULL);
+}
+
+/**
+ * egg_test_title_assert:
+ **/
+void
+egg_test_title_assert (EggTest *test, const gchar *text, gboolean value)
+{
+ egg_test_title (test, "%s", text);
+ if (value)
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, NULL);
+}
+
+/**
+ * egg_test_get_data_file:
+ **/
+gchar *
+egg_test_get_data_file (const gchar *filename)
+{
+ gboolean ret;
+ gchar *full;
+
+ /* check to see if we are being run in the build root */
+ full = g_build_filename ("..", "data", "tests", filename, NULL);
+ ret = g_file_test (full, G_FILE_TEST_EXISTS);
+ if (ret) {
+ return full;
+ }
+ g_free (full);
+
+ /* check to see if we are being run in make check */
+ full = g_build_filename ("..", "..", "data", "tests", filename, NULL);
+ ret = g_file_test (full, G_FILE_TEST_EXISTS);
+ if (ret) {
+ return full;
+ }
+ g_free (full);
+ return NULL;
+}
+
Added: trunk/src/egg-test.h
==============================================================================
--- (empty file)
+++ trunk/src/egg-test.h Fri Nov 21 10:09:56 2008
@@ -0,0 +1,48 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007-2008 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __EGG_TEST_H
+#define __EGG_TEST_H
+
+#include <glib.h>
+#include <string.h>
+
+typedef struct EggTest EggTest;
+
+gboolean egg_test_start (EggTest *test, const gchar *name);
+void egg_test_end (EggTest *test);
+void egg_test_title (EggTest *test, const gchar *format, ...);
+void egg_test_title_assert (EggTest *test, const gchar *text, gboolean value);
+void egg_test_assert (EggTest *test, gboolean value);
+void egg_test_success (EggTest *test, const gchar *format, ...);
+void egg_test_failed (EggTest *test, const gchar *format, ...);
+EggTest *egg_test_init (void);
+gint egg_test_finish (EggTest *test);
+guint egg_test_elapsed (EggTest *test);
+void egg_test_loop_quit (EggTest *test);
+void egg_test_loop_wait (EggTest *test, guint timeout);
+void egg_test_loop_check (EggTest *test);
+void egg_test_set_user_data (EggTest *test, gpointer user_data);
+gpointer egg_test_get_user_data (EggTest *test);
+gchar *egg_test_get_data_file (const gchar *filename);
+
+#endif /* __EGG_TEST_H */
+
Added: trunk/src/egg-unique.c
==============================================================================
--- (empty file)
+++ trunk/src/egg-unique.c Fri Nov 21 10:09:56 2008
@@ -0,0 +1,177 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <string.h>
+#include <glib.h>
+
+#if HAVE_UNIQUE
+#include <unique/unique.h>
+#endif
+
+#include "egg-unique.h"
+#include "egg-debug.h"
+
+static void egg_unique_class_init (EggUniqueClass *klass);
+static void egg_unique_init (EggUnique *unique);
+static void egg_unique_finalize (GObject *object);
+
+#define EGG_UNIQUE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EGG_UNIQUE_TYPE, EggUniquePrivate))
+
+struct EggUniquePrivate
+{
+#if HAVE_UNIQUE
+ UniqueApp *uniqueapp;
+#else
+ gpointer uniqueapp;
+#endif
+};
+
+enum {
+ ACTIVATED,
+ LAST_SIGNAL
+};
+
+static guint signals [LAST_SIGNAL] = { 0 };
+
+G_DEFINE_TYPE (EggUnique, egg_unique, G_TYPE_OBJECT)
+
+#if HAVE_UNIQUE
+/**
+ * egg_unique_message_cb:
+ **/
+static void
+egg_unique_message_cb (UniqueApp *app, UniqueCommand command, UniqueMessageData *message_data,
+ guint time, EggUnique *egg_unique)
+{
+ g_return_if_fail (EGG_IS_UNIQUE (egg_unique));
+ if (command == UNIQUE_ACTIVATE)
+ g_signal_emit (egg_unique, signals [ACTIVATED], 0);
+}
+
+/**
+ * egg_unique_assign:
+ * @egg_unique: This class instance
+ * @service: The service name
+ * Return value: %FALSE if we should exit as another instance is running
+ **/
+gboolean
+egg_unique_assign (EggUnique *egg_unique, const gchar *service)
+{
+ g_return_val_if_fail (EGG_IS_UNIQUE (egg_unique), FALSE);
+ g_return_val_if_fail (service != NULL, FALSE);
+
+ if (egg_unique->priv->uniqueapp != NULL) {
+ g_warning ("already assigned!");
+ return FALSE;
+ }
+
+ /* check to see if the user has another instance open */
+ egg_unique->priv->uniqueapp = unique_app_new (service, NULL);
+ if (unique_app_is_running (egg_unique->priv->uniqueapp)) {
+ egg_debug ("You have another instance running. This program will now close");
+ unique_app_send_message (egg_unique->priv->uniqueapp, UNIQUE_ACTIVATE, NULL);
+ return FALSE;
+ }
+
+ /* Listen for messages from another instances */
+ g_signal_connect (G_OBJECT (egg_unique->priv->uniqueapp), "message-received",
+ G_CALLBACK (egg_unique_message_cb), egg_unique);
+ return TRUE;
+}
+#else
+
+/**
+ * egg_unique_assign:
+ * @egg_unique: This class instance
+ * @service: The service name
+ * Return value: always %TRUE
+ **/
+gboolean
+egg_unique_assign (EggUnique *egg_unique, const gchar *service)
+{
+ g_return_val_if_fail (EGG_IS_UNIQUE (egg_unique), FALSE);
+ return TRUE;
+}
+#endif
+
+/**
+ * egg_unique_class_init:
+ * @egg_unique: This class instance
+ **/
+static void
+egg_unique_class_init (EggUniqueClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = egg_unique_finalize;
+ g_type_class_add_private (klass, sizeof (EggUniquePrivate));
+
+ signals [ACTIVATED] =
+ g_signal_new ("activated",
+ G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EggUniqueClass, activated),
+ NULL, NULL, g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+}
+
+/**
+ * egg_unique_init:
+ * @egg_unique: This class instance
+ **/
+static void
+egg_unique_init (EggUnique *egg_unique)
+{
+ egg_unique->priv = EGG_UNIQUE_GET_PRIVATE (egg_unique);
+ egg_unique->priv->uniqueapp = NULL;
+}
+
+/**
+ * egg_unique_finalize:
+ * @object: This class instance
+ **/
+static void
+egg_unique_finalize (GObject *object)
+{
+ EggUnique *egg_unique;
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (EGG_IS_UNIQUE (object));
+
+ egg_unique = EGG_UNIQUE_OBJECT (object);
+ egg_unique->priv = EGG_UNIQUE_GET_PRIVATE (egg_unique);
+
+ if (egg_unique->priv->uniqueapp != NULL)
+ g_object_unref (egg_unique->priv->uniqueapp);
+ G_OBJECT_CLASS (egg_unique_parent_class)->finalize (object);
+}
+
+/**
+ * egg_unique_new:
+ * Return value: new class instance.
+ **/
+EggUnique *
+egg_unique_new (void)
+{
+ EggUnique *egg_unique;
+ egg_unique = g_object_new (EGG_UNIQUE_TYPE, NULL);
+ return EGG_UNIQUE_OBJECT (egg_unique);
+}
+
Added: trunk/src/egg-unique.h
==============================================================================
--- (empty file)
+++ trunk/src/egg-unique.h Fri Nov 21 10:09:56 2008
@@ -0,0 +1,59 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __EGG_UNIQUE_H
+#define __EGG_UNIQUE_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define EGG_UNIQUE_TYPE (egg_unique_get_type ())
+#define EGG_UNIQUE_OBJECT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EGG_UNIQUE_TYPE, EggUnique))
+#define EGG_UNIQUE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EGG_UNIQUE_TYPE, EggUniqueClass))
+#define EGG_IS_UNIQUE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EGG_UNIQUE_TYPE))
+#define EGG_IS_UNIQUE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EGG_UNIQUE_TYPE))
+#define EGG_UNIQUE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EGG_UNIQUE_TYPE, EggUniqueClass))
+
+typedef struct EggUniquePrivate EggUniquePrivate;
+
+typedef struct
+{
+ GObject parent;
+ EggUniquePrivate *priv;
+} EggUnique;
+
+typedef struct
+{
+ GObjectClass parent_class;
+ void (* activated) (EggUnique *unique);
+} EggUniqueClass;
+
+GType egg_unique_get_type (void);
+EggUnique *egg_unique_new (void);
+
+gboolean egg_unique_assign (EggUnique *unique,
+ const gchar *service);
+
+G_END_DECLS
+
+#endif /* __EGG_UNIQUE_H */
+
Added: trunk/src/gdb.sh
==============================================================================
--- (empty file)
+++ trunk/src/gdb.sh Fri Nov 21 10:09:56 2008
@@ -0,0 +1 @@
+sudo gdb --args $1 --verbose
Modified: trunk/src/gpk-application.c
==============================================================================
--- trunk/src/gpk-application.c (original)
+++ trunk/src/gpk-application.c Fri Nov 21 10:09:56 2008
@@ -47,6 +47,7 @@
#include "gpk-client-run.h"
#include "gpk-client-chooser.h"
#include "gpk-cell-renderer-uri.h"
+#include "gpk-desktop.h"
static void gpk_application_class_init (GpkApplicationClass *klass);
static void gpk_application_init (GpkApplication *application);
Modified: trunk/src/gpk-client-chooser.c
==============================================================================
--- trunk/src/gpk-client-chooser.c (original)
+++ trunk/src/gpk-client-chooser.c Fri Nov 21 10:09:56 2008
@@ -35,6 +35,7 @@
#include "gpk-gnome.h"
#include "gpk-common.h"
#include "gpk-enum.h"
+#include "gpk-desktop.h"
static GtkListStore *list_store = NULL;
static gchar *package_id = NULL;
Modified: trunk/src/gpk-client-dialog.c
==============================================================================
--- trunk/src/gpk-client-dialog.c (original)
+++ trunk/src/gpk-client-dialog.c Fri Nov 21 10:09:56 2008
@@ -45,6 +45,7 @@
#include "gpk-common.h"
#include "gpk-gnome.h"
#include "gpk-enum.h"
+#include "gpk-desktop.h"
static void gpk_client_dialog_class_init (GpkClientDialogClass *klass);
static void gpk_client_dialog_init (GpkClientDialog *dialog);
Modified: trunk/src/gpk-client-run.c
==============================================================================
--- trunk/src/gpk-client-run.c (original)
+++ trunk/src/gpk-client-run.c Fri Nov 21 10:09:56 2008
@@ -223,7 +223,7 @@
pk_package_id_free (id);
/* might not be valid */
- if (!gpk_check_icon_valid (icon)) {
+ if (!gpk_desktop_check_icon_valid (icon)) {
g_free (icon);
icon = NULL;
}
Modified: trunk/src/gpk-client.c
==============================================================================
--- trunk/src/gpk-client.c (original)
+++ trunk/src/gpk-client.c Fri Nov 21 10:09:56 2008
@@ -59,6 +59,7 @@
#include "gpk-vendor.h"
#include "gpk-enum.h"
#include "gpk-x11.h"
+#include "gpk-desktop.h"
static void gpk_client_class_init (GpkClientClass *klass);
static void gpk_client_init (GpkClient *gclient);
Modified: trunk/src/gpk-common.c
==============================================================================
--- trunk/src/gpk-common.c (original)
+++ trunk/src/gpk-common.c Fri Nov 21 10:09:56 2008
@@ -271,200 +271,6 @@
}
/**
- * gpk_check_icon_valid:
- *
- * Check icon actually exists and is valid in this theme
- **/
-gboolean
-gpk_check_icon_valid (const gchar *icon)
-{
- GtkIconInfo *icon_info;
- GtkIconTheme *icon_theme = NULL;
- gboolean ret = TRUE;
-
- /* trivial case */
- if (egg_strzero (icon))
- return FALSE;
-
- /* no unref required */
- icon_theme = gtk_icon_theme_get_default ();
-
- /* default to 32x32 */
- icon_info = gtk_icon_theme_lookup_icon (icon_theme, icon, 32, GTK_ICON_LOOKUP_USE_BUILTIN);
- if (icon_info == NULL) {
- egg_debug ("ignoring broken icon %s", icon);
- ret = FALSE;
- } else {
- /* we only used this to see if it was valid */
- gtk_icon_info_free (icon_info);
- }
- return ret;
-}
-
-
-
-/**
- * gpk_desktop_get_file_weight:
- **/
-gint
-gpk_desktop_get_file_weight (const gchar *filename)
-{
- GKeyFile *file;
- gboolean ret;
- gchar *value;
- gint weight = 0;
- const gchar *locale;
-
- locale = setlocale (LC_ALL, NULL);
- file = g_key_file_new ();
- ret = g_key_file_load_from_file (file, filename, G_KEY_FILE_KEEP_TRANSLATIONS, NULL);
- if (!ret) {
- egg_debug ("failed to open %s", filename);
- weight = G_MININT;
- goto out;
- }
-
- /* application */
- value = g_key_file_get_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_TYPE, NULL);
- if (egg_strequal (value, G_KEY_FILE_DESKTOP_TYPE_APPLICATION))
- weight += 10;
- g_free (value);
-
- /* icon */
- value = g_key_file_get_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_ICON, NULL);
- if (value != NULL && gpk_check_icon_valid (value))
- weight += 50;
- g_free (value);
-
- /* hidden */
- value = g_key_file_get_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_HIDDEN, NULL);
- if (value != NULL)
- weight -= 100;
- g_free (value);
-
- value = g_key_file_get_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY, NULL);
- if (egg_strequal (value, "true"))
- weight -= 100;
- g_free (value);
-
- /* hidden */
- value = g_key_file_get_locale_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_NAME, locale, NULL);
- if (value != NULL)
- weight += 30;
- g_free (value);
-
-out:
- g_key_file_free (file);
- return weight;
-}
-
-/**
- * gpk_desktop_guess_best_file:
- **/
-gchar *
-gpk_desktop_guess_best_file (PkDesktop *desktop, const gchar *package)
-{
- GPtrArray *array;
- const gchar *filename;
- gchar *best_file = NULL;
- guint i;
- guint max = G_MININT;
- guint max_index = 0;
- gint weight;
-
- array = pk_desktop_get_files_for_package (desktop, package, NULL);
- if (array == NULL)
- goto out;
- if (array->len == 0)
- goto out;
-
- /* go through each option, and weight each one */
- for (i=0; i<array->len; i++) {
- filename = g_ptr_array_index (array, i);
- weight = gpk_desktop_get_file_weight (filename);
- egg_debug ("file %s has weight %i", filename, weight);
- if (weight > max) {
- max = weight;
- max_index = i;
- }
- }
-
- /* we've got a best */
- best_file = g_strdup (g_ptr_array_index (array, max_index));
- egg_debug ("using %s", best_file);
-out:
- if (array != NULL) {
- g_ptr_array_foreach (array, (GFunc) g_free, NULL);
- g_ptr_array_free (array, TRUE);
- }
- return best_file;
-}
-
-/**
- * gpk_desktop_guess_icon_name:
- **/
-gchar *
-gpk_desktop_guess_icon_name (PkDesktop *desktop, const gchar *package)
-{
- GKeyFile *file;
- gchar *filename;
- gchar *data = NULL;
- gboolean ret;
-
- filename = gpk_desktop_guess_best_file (desktop, package);
- if (filename == NULL)
- goto out;
-
- /* get data from file */
- file = g_key_file_new ();
- ret = g_key_file_load_from_file (file, filename, G_KEY_FILE_NONE, NULL);
- if (!ret) {
- egg_warning ("failed to open %s", filename);
- goto out;
- }
- data = g_key_file_get_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_ICON, NULL);
- g_key_file_free (file);
-
- /* one final check */
- if (data != NULL && !gpk_check_icon_valid (data)) {
- g_free (data);
- data = NULL;
- }
-out:
- g_free (filename);
- return data;
-}
-
-/**
- * gpk_desktop_guess_localised_name:
- **/
-gchar *
-gpk_desktop_guess_localised_name (PkDesktop *desktop, const gchar *package)
-{
- GKeyFile *file;
- gchar *filename;
- gchar *data = NULL;
- gboolean ret;
-
- filename = gpk_desktop_guess_best_file (desktop, package);
- if (filename == NULL)
- goto out;
-
- /* get data from file */
- file = g_key_file_new ();
- ret = g_key_file_load_from_file (file, filename, G_KEY_FILE_KEEP_TRANSLATIONS, NULL);
- if (!ret) {
- egg_warning ("failed to open %s", filename);
- goto out;
- }
- data = g_key_file_get_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_NAME, NULL);
- g_key_file_free (file);
-out:
- g_free (filename);
- return data;
-}
-
-/**
* gpk_set_animated_icon_from_status:
**/
gboolean
Modified: trunk/src/gpk-common.h
==============================================================================
--- trunk/src/gpk-common.h (original)
+++ trunk/src/gpk-common.h Fri Nov 21 10:09:56 2008
@@ -87,15 +87,6 @@
gchar *gpk_time_to_localised_string (guint time_secs);
gboolean gpk_check_privileged_user (const gchar *application_name,
gboolean show_ui);
-
-gchar *gpk_desktop_guess_best_file (PkDesktop *desktop,
- const gchar *package);
-gchar *gpk_desktop_guess_icon_name (PkDesktop *desktop,
- const gchar *package);
-gchar *gpk_desktop_guess_localised_name (PkDesktop *desktop,
- const gchar *package);
-gint gpk_desktop_get_file_weight (const gchar *filename);
-gboolean gpk_check_icon_valid (const gchar *icon);
gboolean gpk_set_animated_icon_from_status (GpkAnimatedIcon *icon,
PkStatusEnum status,
GtkIconSize size);
Added: trunk/src/gpk-desktop.c
==============================================================================
--- (empty file)
+++ trunk/src/gpk-desktop.c Fri Nov 21 10:09:56 2008
@@ -0,0 +1,224 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <packagekit-glib/packagekit.h>
+#include <locale.h>
+
+#include "egg-debug.h"
+
+#include "gpk-desktop.h"
+
+/**
+ * gpk_desktop_check_icon_valid:
+ *
+ * Check icon actually exists and is valid in this theme
+ **/
+gboolean
+gpk_desktop_check_icon_valid (const gchar *icon)
+{
+ GtkIconInfo *icon_info;
+ GtkIconTheme *icon_theme = NULL;
+ gboolean ret = TRUE;
+
+ /* trivial case */
+ if (egg_strzero (icon))
+ return FALSE;
+
+ /* no unref required */
+ icon_theme = gtk_icon_theme_get_default ();
+
+ /* default to 32x32 */
+ icon_info = gtk_icon_theme_lookup_icon (icon_theme, icon, 32, GTK_ICON_LOOKUP_USE_BUILTIN);
+ if (icon_info == NULL) {
+ egg_debug ("ignoring broken icon %s", icon);
+ ret = FALSE;
+ } else {
+ /* we only used this to see if it was valid */
+ gtk_icon_info_free (icon_info);
+ }
+ return ret;
+}
+
+/**
+ * gpk_desktop_get_file_weight:
+ **/
+gint
+gpk_desktop_get_file_weight (const gchar *filename)
+{
+ GKeyFile *file;
+ gboolean ret;
+ gchar *value;
+ gint weight = 0;
+ const gchar *locale;
+
+ locale = setlocale (LC_ALL, NULL);
+ file = g_key_file_new ();
+ ret = g_key_file_load_from_file (file, filename, G_KEY_FILE_KEEP_TRANSLATIONS, NULL);
+ if (!ret) {
+ egg_debug ("failed to open %s", filename);
+ weight = G_MININT;
+ goto out;
+ }
+
+ /* application */
+ value = g_key_file_get_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_TYPE, NULL);
+ if (egg_strequal (value, G_KEY_FILE_DESKTOP_TYPE_APPLICATION))
+ weight += 10;
+ g_free (value);
+
+ /* icon */
+ value = g_key_file_get_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_ICON, NULL);
+ if (value != NULL && gpk_desktop_check_icon_valid (value))
+ weight += 50;
+ g_free (value);
+
+ /* hidden */
+ value = g_key_file_get_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_HIDDEN, NULL);
+ if (value != NULL)
+ weight -= 100;
+ g_free (value);
+
+ value = g_key_file_get_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY, NULL);
+ if (egg_strequal (value, "true"))
+ weight -= 100;
+ g_free (value);
+
+ /* hidden */
+ value = g_key_file_get_locale_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_NAME, locale, NULL);
+ if (value != NULL)
+ weight += 30;
+ g_free (value);
+
+out:
+ g_key_file_free (file);
+ return weight;
+}
+
+/**
+ * gpk_desktop_guess_best_file:
+ **/
+gchar *
+gpk_desktop_guess_best_file (PkDesktop *desktop, const gchar *package)
+{
+ GPtrArray *array;
+ const gchar *filename;
+ gchar *best_file = NULL;
+ guint i;
+ guint max = G_MININT;
+ guint max_index = 0;
+ gint weight;
+
+ array = pk_desktop_get_files_for_package (desktop, package, NULL);
+ if (array == NULL)
+ goto out;
+ if (array->len == 0)
+ goto out;
+
+ /* go through each option, and weight each one */
+ for (i=0; i<array->len; i++) {
+ filename = g_ptr_array_index (array, i);
+ weight = gpk_desktop_get_file_weight (filename);
+ egg_debug ("file %s has weight %i", filename, weight);
+ if (weight > max) {
+ max = weight;
+ max_index = i;
+ }
+ }
+
+ /* we've got a best */
+ best_file = g_strdup (g_ptr_array_index (array, max_index));
+ egg_debug ("using %s", best_file);
+out:
+ if (array != NULL) {
+ g_ptr_array_foreach (array, (GFunc) g_free, NULL);
+ g_ptr_array_free (array, TRUE);
+ }
+ return best_file;
+}
+
+/**
+ * gpk_desktop_guess_icon_name:
+ **/
+gchar *
+gpk_desktop_guess_icon_name (PkDesktop *desktop, const gchar *package)
+{
+ GKeyFile *file;
+ gchar *filename;
+ gchar *data = NULL;
+ gboolean ret;
+
+ filename = gpk_desktop_guess_best_file (desktop, package);
+ if (filename == NULL)
+ goto out;
+
+ /* get data from file */
+ file = g_key_file_new ();
+ ret = g_key_file_load_from_file (file, filename, G_KEY_FILE_NONE, NULL);
+ if (!ret) {
+ egg_warning ("failed to open %s", filename);
+ goto out;
+ }
+ data = g_key_file_get_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_ICON, NULL);
+ g_key_file_free (file);
+
+ /* one final check */
+ if (data != NULL && !gpk_desktop_check_icon_valid (data)) {
+ g_free (data);
+ data = NULL;
+ }
+out:
+ g_free (filename);
+ return data;
+}
+
+/**
+ * gpk_desktop_guess_localised_name:
+ **/
+gchar *
+gpk_desktop_guess_localised_name (PkDesktop *desktop, const gchar *package)
+{
+ GKeyFile *file;
+ gchar *filename;
+ gchar *data = NULL;
+ gboolean ret;
+
+ filename = gpk_desktop_guess_best_file (desktop, package);
+ if (filename == NULL)
+ goto out;
+
+ /* get data from file */
+ file = g_key_file_new ();
+ ret = g_key_file_load_from_file (file, filename, G_KEY_FILE_KEEP_TRANSLATIONS, NULL);
+ if (!ret) {
+ egg_warning ("failed to open %s", filename);
+ goto out;
+ }
+ data = g_key_file_get_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_NAME, NULL);
+ g_key_file_free (file);
+out:
+ g_free (filename);
+ return data;
+}
+
Added: trunk/src/gpk-desktop.h
==============================================================================
--- (empty file)
+++ trunk/src/gpk-desktop.h Fri Nov 21 10:09:56 2008
@@ -0,0 +1,41 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2008 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GPK_DESKTOP_H
+#define __GPK_DESKTOP_H
+
+#include <glib.h>
+#include <packagekit-glib/packagekit.h>
+
+G_BEGIN_DECLS
+
+gchar *gpk_desktop_guess_best_file (PkDesktop *desktop,
+ const gchar *package);
+gchar *gpk_desktop_guess_icon_name (PkDesktop *desktop,
+ const gchar *package);
+gchar *gpk_desktop_guess_localised_name (PkDesktop *desktop,
+ const gchar *package);
+gint gpk_desktop_get_file_weight (const gchar *filename);
+gboolean gpk_desktop_check_icon_valid (const gchar *icon);
+
+G_END_DECLS
+
+#endif /* __GPK_DESKTOP_H */
Added: trunk/src/org.freedesktop.PackageKit.xml
==============================================================================
--- (empty file)
+++ trunk/src/org.freedesktop.PackageKit.xml Fri Nov 21 10:09:56 2008
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/">
+ <interface name="org.freedesktop.PackageKit">
+ <method name="IsPackageInstalled">
+ <arg type="s" name="package_name" direction="in"/>
+ <arg type="b" name="installed" direction="out"/>
+ </method>
+ <method name="InstallLocalFile">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg type="u" name="xid" direction="in"/>
+ <arg type="u" name="timestamp" direction="in"/>
+ <arg type="s" name="full_path" direction="in"/>
+ </method>
+ <method name="InstallProvideFile">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg type="u" name="xid" direction="in"/>
+ <arg type="u" name="timestamp" direction="in"/>
+ <arg type="s" name="full_path" direction="in"/>
+ </method>
+ <method name="InstallPackageName">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg type="u" name="xid" direction="in"/>
+ <arg type="u" name="timestamp" direction="in"/>
+ <arg type="s" name="package_name" direction="in"/>
+ </method>
+ <method name="InstallPackageNames">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg type="u" name="xid" direction="in"/>
+ <arg type="u" name="timestamp" direction="in"/>
+ <arg type="as" name="package_names" direction="in"/>
+ </method>
+ <method name="InstallMimeType">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg type="u" name="xid" direction="in"/>
+ <arg type="u" name="timestamp" direction="in"/>
+ <arg type="s" name="mime_type" direction="in"/>
+ </method>
+ <method name="InstallGStreamerCodecs">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg type="u" name="xid" direction="in"/>
+ <arg type="u" name="timestamp" direction="in"/>
+ <arg type="a(ss)" name="codecs" direction="in"/>
+ </method>
+ <method name="InstallFont">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg type="u" name="xid" direction="in"/>
+ <arg type="u" name="timestamp" direction="in"/>
+ <arg type="s" name="font_desc" direction="in"/>
+ </method>
+ <method name="InstallCatalog">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg type="u" name="xid" direction="in"/>
+ <arg type="u" name="timestamp" direction="in"/>
+ <arg type="s" name="catalog_file" direction="in"/>
+ </method>
+ </interface>
+</node>
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]