<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>EMSTONE Bebop &#187; GLib</title>
	<atom:link href="http://bebop.emstone.com/tags/glib/feed/" rel="self" type="application/rss+xml" />
	<link>http://bebop.emstone.com</link>
	<description>엠스톤 개발팀 블로그</description>
	<lastBuildDate>Sun, 29 Jan 2012 05:25:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.0/kr/</creativeCommons:license>
		<item>
		<title>Vala 언어 소개</title>
		<link>http://lethean.pe.kr/2011/06/15/vala-language-introduction/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vala-language-introduction&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vala-%25ec%2596%25b8%25ec%2596%25b4-%25ec%2586%258c%25ea%25b0%259c</link>
		<comments>http://lethean.pe.kr/2011/06/15/vala-language-introduction/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vala-language-introduction#comments</comments>
		<pubDate>Tue, 14 Jun 2011 15:15:01 +0000</pubDate>
		<dc:creator>lethean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[GLib]]></category>
		<category><![CDATA[Vala]]></category>
		<category><![CDATA[카스탈리엔]]></category>

		<guid isPermaLink="false">http://lethean.pe.kr/?p=1695</guid>
		<description><![CDATA[Vala 언어는 C# 언어와 문법이 비슷한 객체 지향 언어입니다. Vala 언어로 작성한 소스를 이용해 실행 파일을 직접 만들 수도 있지만 C 소스 코드로 변환할 수도 있는데, 더 정확히 말하면, GObject 프레임워크를 이용하는 순수 GLib 기반 C 언어 코드를 생성한 뒤 &#8230; <a href="http://lethean.pe.kr/2011/06/15/vala-language-introduction/">Continue reading <span>&#8594;</span></a> <a href="http://lethean.pe.kr/2011/06/15/vala-language-introduction/?utm_source=rss&#38;utm_medium=rss&#38;utm_campaign=vala-language-introduction">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="https://live.gnome.org/Vala">Vala</a> 언어는 C# 언어와 문법이 비슷한 객체 지향 언어입니다. Vala 언어로 작성한 소스를 이용해 실행 파일을 직접 만들 수도 있지만 C 소스 코드로 변환할 수도 있는데, 더 정확히 말하면, GObject 프레임워크를 이용하는 순수 GLib 기반 C 언어 코드를 생성한 뒤 이를 다시 C 컴파일를 이용해 실행 파일을 생성합니다. 따라서 이렇게 생성된 C 소스 코드는 이론적으로 GLib 라이브러리가 포팅된 어떤 플랫폼에서든 동작할 수 있고, 실행 속도 역시 C 언어로 작성된 코드와 거의 동일한 성능을 보여 줍니다. 생성된 소스 코드나 라이브러리는 GLib 외의 다른 라이브러리 의존성이 없기 때문에(posix 프로파일을 사용하면 GLib 의존성도 없어짐) 당연히 다른 C 언어에서도 이용할 수 있고, 반대로 C 언어로 개발된 라이브러리를 별다른 바인딩 코드 없이 VAPI 기법을 통해 사용할 수도 있습니다.</p>
<p>요즘 GNOME 프로젝트 개발 흐름을 보면 크게 두 가지 언어, JavaScript와 Vala가 대두되고 있는데, GUI 같은 상위 제어 모듈은 JavaScript로 구현하고, 성능이 중요한 하위 모듈은 C + Vala로 구현한 뒤 이를 하나의 프로그램에서 합쳐서 성능과 개발 효율을 동시에 얻고자 하는 것 같습니다.</p>
<p>사실, GObject 프레임워크가 좋긴 하지만, 여러 고수준 언어에서 사용할 때와는 달리 C 언어에서 사용하려면 어려움이 많아서 비판을 많이 받습니다. Vala 언어는, 말하자면, 이러한 반복되는 코드 재작성(boilerplate code)과 자잘한 코딩을 획기적으로 줄여주면서 C 언어로 GObject 객체 지향 프로그램을 할 수 있도록 도와주는 역할을 하는 겁니다. C++의 복잡함은 싫고, 인터프리터 언어의 느림은 견디기 힘들고&#8230; 결국 목마른 사람들이 직접 우물을 판 셈입니다.</p>
<p>그렇다고 Vala 언어는 비단 GTK+ / Clutter 기반 GUI 프로그램을 개발하는데만 사용되지 않고, 서버 데몬[<a href="http://www.freedesktop.org/wiki/Software/systemd">systemd</a>] 같은 콘솔 프로그램 개발에도 사용합니다. 이미 <a href="http://live.gnome.org/Vala/Documentation#Projects_Developed_in_Vala">수많은 프로그램이 Vala를 이용해 개발</a>되었는데, C 언어로 개발되었던 기존 프로그램을 Vala 언어로 다시 작성한 것[<a href="http://live.gnome.org/Cheese">Cheese</a>]도 눈에 띕니다.</p>
<p>그러나, Vala 언어의 단점이라면, C 언어 부류인 C#과 문법이 비슷하긴 하지만, 무엇보다도 새 언어를 익혀야 한다는 점, 그리고 GLib / GObject 개념에 익숙하지 않을 경우 익히는데 조금 더 시간과 노력이 필요하다는 점입니다. 물론, 오픈 소스 리눅스 개발자 커뮤니티에서 개발되어, 아직은, 그 안에서만 사용하는 마이너 언어라는 한계 때문에, 즉 상용 벤더의 지원이나 Visual Studio, XCode 등과 같은 완벽한 통합 개발 환경도 없기 때문에, 많은 개발자를 끌어당길 매력이 부족한 것도 사실입니다. 하지만 한편으로는, 오픈 소스이기 때문에 오히려 미래가 더 투명한게 아닐까 하는 생각도 듭니다.</p>
<p>아무튼, Vala 언어에 대해 더 관심이 생기는 분은 <a href="http://live.gnome.org/Vala/Documentation">소개, FAQ, 튜토리얼 문서</a> 등을 한 번 훑어보시길 바랍니다. 샘플 코드도 많고, 튜토리얼도 참 많습니다. 아마 C++ / C# / Java / Python 등과 같은 객체 지향 언어에 익숙한 개발자라면 생각보다 어렵지 않다는 사실을 알게 될 겁니다. 더불어, Vala 컴파일러가 생성한 C 소스 코드를 한 번 확인해 보시면, 객체 지향 개념을 이런 식으로 코딩하고 구현할 수도 있구나 하는, 결국 중요한 건 개발자의 능력이지, 사용하는 언어나 개발도구가 전부가 아니란 것도 느끼게 됩니다.</p>
]]></content:encoded>
			<wfw:commentRss>http://lethean.pe.kr/2011/06/15/vala-language-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.0/kr/</creativeCommons:license>
	</item>
		<item>
		<title>GUDev 사용하기</title>
		<link>http://lethean.pe.kr/2011/03/07/using-gudev/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-gudev&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gudev-%25ec%2582%25ac%25ec%259a%25a9%25ed%2595%2598%25ea%25b8%25b0</link>
		<comments>http://lethean.pe.kr/2011/03/07/using-gudev/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-gudev#comments</comments>
		<pubDate>Mon, 07 Mar 2011 12:15:48 +0000</pubDate>
		<dc:creator>lethean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[GLib]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Udev]]></category>
		<category><![CDATA[카스탈리엔]]></category>

		<guid isPermaLink="false">http://lethean.pe.kr/?p=1611</guid>
		<description><![CDATA[이제는 리눅스 데스크탑 뿐 아니라 임베디드 시스템에서도 당연하게 사용하는 udev 시스템은 단순히 장치 파일을 자동으로 생성해 주는 역할 뿐 아니라 여러 핫플러그(hot-plug) 방식 장치를 감지하는데도 유용하게 사용됩니다. 비단 키보드, 마우스 같은 입력 장치 뿐 아니라 USB 플래시, SATA / IDE &#8230; <a href="http://lethean.pe.kr/2011/03/07/using-gudev/">Continue reading <span>&#8594;</span></a> <a href="http://lethean.pe.kr/2011/03/07/using-gudev/?utm_source=rss&#38;utm_medium=rss&#38;utm_campaign=using-gudev">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>이제는 리눅스 데스크탑 뿐 아니라 임베디드 시스템에서도 당연하게 사용하는 <a href="http://en.wikipedia.org/wiki/Udev">udev</a> 시스템은 단순히 장치 파일을 자동으로 생성해 주는 역할 뿐 아니라 여러 핫플러그(hot-plug) 방식 장치를 감지하는데도 유용하게 사용됩니다. 비단 키보드, 마우스 같은 입력 장치 뿐 아니라 USB 플래시, SATA / IDE / SCSI 하드디스크, CD-RW 등과 같은 저장장치가 삽입되었거나 제거되었을 경우 쉽게 감지할 수 있게 도와줍니다.</p>
<p>이러한 udev 서브 시스템의 혜택을 개발자가 얻기 위해 많은 방법이 존재하지만, 이 글에서는 GLib 메인루프 기반으로 동작하는 <a href="http://www.kernel.org/pub/linux/utils/kernel/hotplug/gudev/">GUDev</a> 라이브러리를 이용하는 법을 설명합니다. GLib 라이브러리를 사용하지 않을 경우 직접 <a href="http://www.kernel.org/pub/linux/utils/kernel/hotplug/libudev/">libudev</a> 라이브러리를 사용해도 되지만, 기본 개념만 파악하면 쉽게 어떤 라이브러리를 사용해도 상관없기 때문에 인터페이스가 더 편하고 직관적인 GUDev 라이브러리를 사용합니다. 참고로, 이 글은 &#8220;<a href="http://www.signal11.us/oss/udev/">libudev and Sysfs Tutorial</a>﻿&#8221; 글과 &#8220;<a href="http://www.piware.de/2010/06/gudev-vala-bindings/">gudev Vala bindings</a>&#8221; 글을 참고했습니다.</p>
<p>먼저 라이브러리를 설치하려면 우분투에서는 <code>libgudev-1.0-dev</code> 패키지, 아치리눅스에서는 <code>udev</code> 패키지를 설치하면 됩니다. (여담이지만, 아치리눅스는 개발에 필요한 헤더파일과 라이브러리가 별도 패키지로 분리되어 있는 경우가 별로 없는 것 같습니다)</p>
<p>다음 소스 코드는 현재 시스템에 장착된 모든 블럭 장치(block)를 보여주고, 이후 USB 플래시가 삽입되거나 제거되었을때 이를 감지하여 표시하도록 한 소스 코드입니다.(<code>gudev.c</code>)</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &lt;gudev/gudev.h&gt;</span>
&nbsp;
<span style="color: #993333;">static</span> <span style="color: #993333;">void</span>
print_device <span style="color: #009900;">&#40;</span>GUdevDevice <span style="color: #339933;">*</span>device<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #993333;">const</span> gchar <span style="color: #339933;">*</span> <span style="color: #993333;">const</span> <span style="color: #339933;">*</span>symlinks<span style="color: #339933;">;</span>
&nbsp;
  g_print <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;  subsystem       : %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
           <span style="color: #ff0000;">&quot;  devtype         : %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
           <span style="color: #ff0000;">&quot;  name            : %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
           <span style="color: #ff0000;">&quot;  number          : %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
           <span style="color: #ff0000;">&quot;  sysfs_path      : %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
           <span style="color: #ff0000;">&quot;  driver          : %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
           <span style="color: #ff0000;">&quot;  action          : %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
           <span style="color: #ff0000;">&quot;  seqnum          : %lld<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
           <span style="color: #ff0000;">&quot;  device_type     : %d<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
           <span style="color: #ff0000;">&quot;  device_number   : %d<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
           <span style="color: #ff0000;">&quot;  device_file     : %s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
           <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span>
           g_udev_device_get_subsystem <span style="color: #009900;">&#40;</span>device<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
           g_udev_device_get_devtype <span style="color: #009900;">&#40;</span>device<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
           g_udev_device_get_name <span style="color: #009900;">&#40;</span>device<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
           g_udev_device_get_number <span style="color: #009900;">&#40;</span>device<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
           g_udev_device_get_sysfs_path <span style="color: #009900;">&#40;</span>device<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
           g_udev_device_get_driver <span style="color: #009900;">&#40;</span>device<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
           g_udev_device_get_action <span style="color: #009900;">&#40;</span>device<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
           g_udev_device_get_seqnum <span style="color: #009900;">&#40;</span>device<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
           g_udev_device_get_device_type <span style="color: #009900;">&#40;</span>device<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
           g_udev_device_get_device_number <span style="color: #009900;">&#40;</span>device<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
           g_udev_device_get_device_file <span style="color: #009900;">&#40;</span>device<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">static</span> <span style="color: #993333;">void</span>
uevented <span style="color: #009900;">&#40;</span>GUdevClient <span style="color: #339933;">*</span>client<span style="color: #339933;">,</span>
          gchar       <span style="color: #339933;">*</span>action<span style="color: #339933;">,</span>
          GUdevDevice <span style="color: #339933;">*</span>device<span style="color: #339933;">,</span>
          gpointer     user_data<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  g_print <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;[action:%s]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> action<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  print_device <span style="color: #009900;">&#40;</span>device<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">static</span> <span style="color: #993333;">void</span>
print_block_device <span style="color: #009900;">&#40;</span>gpointer data<span style="color: #339933;">,</span>
                    gpointer user_data<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  GUdevDevice <span style="color: #339933;">*</span>device <span style="color: #339933;">=</span> data<span style="color: #339933;">;</span>
&nbsp;
  print_device <span style="color: #009900;">&#40;</span>device<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  g_object_unref <span style="color: #009900;">&#40;</span>device<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">static</span> <span style="color: #993333;">void</span>
print_block_devices <span style="color: #009900;">&#40;</span>GUdevClient <span style="color: #339933;">*</span>client<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  GList <span style="color: #339933;">*</span>devices<span style="color: #339933;">;</span>
&nbsp;
  devices <span style="color: #339933;">=</span> g_udev_client_query_by_subsystem <span style="color: #009900;">&#40;</span>client<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;block&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>devices<span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    g_print <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;[block devices]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    g_list_foreach <span style="color: #009900;">&#40;</span>devices<span style="color: #339933;">,</span> print_block_device<span style="color: #339933;">,</span> NULL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    g_list_free <span style="color: #009900;">&#40;</span>devices<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">int</span>
main <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span>    argc<span style="color: #339933;">,</span>
      <span style="color: #993333;">char</span> <span style="color: #339933;">**</span>argv<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #993333;">const</span> gchar <span style="color: #339933;">*</span>subsystems<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">4</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span>
    <span style="color: #009900;">&#123;</span> <span style="color: #ff0000;">&quot;usb/usb_interface&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;scsi/scsi_device&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;block&quot;</span><span style="color: #339933;">,</span> NULL <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
  GUdevClient <span style="color: #339933;">*</span>client<span style="color: #339933;">;</span>
  GMainLoop   <span style="color: #339933;">*</span>main_loop<span style="color: #339933;">;</span>
&nbsp;
  g_type_init <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  main_loop <span style="color: #339933;">=</span> g_main_loop_new <span style="color: #009900;">&#40;</span>NULL<span style="color: #339933;">,</span> FALSE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  client <span style="color: #339933;">=</span> g_udev_client_new <span style="color: #009900;">&#40;</span>subsystems<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  g_signal_connect <span style="color: #009900;">&#40;</span>client<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;uevent&quot;</span><span style="color: #339933;">,</span> G_CALLBACK <span style="color: #009900;">&#40;</span>uevented<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> NULL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  print_block_devices <span style="color: #009900;">&#40;</span>client<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  g_main_loop_run <span style="color: #009900;">&#40;</span>main_loop<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  g_object_unref <span style="color: #009900;">&#40;</span>client<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>컴파일 하려면 다음과 같이 실행하면 됩니다.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">gcc</span> <span style="color: #660033;">-o</span> gudev gudev.c <span style="color: #000000; font-weight: bold;">`</span>pkg-config <span style="color: #660033;">--cflags</span> <span style="color: #660033;">--libs</span> gudev-<span style="color: #000000;">1.0</span><span style="color: #000000; font-weight: bold;">`</span></pre></div></div>

<p>소스 코드를 간단하게 설명하면, 제일 먼저 <code><a href="http://www.kernel.org/pub/linux/utils/kernel/hotplug/gudev/GUdevClient.html#g-udev-client-new">g_udev_client_new()</a></code> 함수를 이용해 <code>GUdevClient</code> 객체를 생성합니다. 이때 넘겨주는 인수는 변화를 감지하고 싶은 서브 시스템 목록인데, 여기서는 모든 블럭 장치와 USB, SCSI 서브 시스템을 지정했습니다.(SCSI는 실제로 모든 종류의 하드디스크를 의미하기도 합니다) 만일 <code>NULL</code>을 지정하면 변화 감지 기능을 사용하지 않고 그냥 질의(query) 계열 API만 사용할 수 있으며, 비어있는 목록을 넘겨주면 시스템의 모든 서브시스템의 장치 변화를 감지해서 시그널로 알려줍니다. 참고로 매뉴얼에는 클라이언트를 생성한 쓰레드의 메인루프를 사용하여 감지 루틴이 실행된다고 하니, 만일 별도 쓰레드에서 이 감지 작업을 수행하려면 쓰레드를 먼저 만들고 그 쓰레드 안에서 생성해야 합니다. 이 예제에서는 테스트를 위해 기본 메인 루프를 사용하고 있습니다.</p>
<p>직접 장치 목록을 질의(query)하거나 시그널이 발생했을 경우 넘겨받는 <code>GUdevDevice</code> 객체와 <code><a href="http://www.kernel.org/pub/linux/utils/kernel/hotplug/gudev/GUdevDevice.html">g_udev_device_get_*()</a></code> 계열 API를 이용하면 장치의 세부 정보를 얻을 수 있습니다. 위 예제에서는 udev / sysfs 관련 속성 등은 출력하지 않고 있지만, 필요하다면 더 자세한 정보를 얻을 수 있습니다.</p>
<p>실행하면 대략 다음과 같이 출력됩니다. (당연히 실행 환경에 따라 결과가 다릅니다)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ .<span style="color: #000000; font-weight: bold;">/</span>gudev
<span style="color: #7a0874; font-weight: bold;">&#91;</span>block devices<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  subsystem       : block
  devtype         : disk
  name            : sda
  number          : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  sysfs_path      : <span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>devices<span style="color: #000000; font-weight: bold;">/</span>pci0000:00<span style="color: #000000; font-weight: bold;">/</span>0000:00:1f.2<span style="color: #000000; font-weight: bold;">/</span>host0<span style="color: #000000; font-weight: bold;">/</span>target0:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span>block<span style="color: #000000; font-weight: bold;">/</span>sda
  driver          : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  action          : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  seqnum          : <span style="color: #000000;">0</span>
  device_type     : <span style="color: #000000;">98</span>
  device_number   : <span style="color: #000000;">2048</span>
  device_file     : <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda
&nbsp;
  subsystem       : block
  devtype         : partition
  name            : sda1
  number          : <span style="color: #000000;">1</span>
  sysfs_path      : <span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>devices<span style="color: #000000; font-weight: bold;">/</span>pci0000:00<span style="color: #000000; font-weight: bold;">/</span>0000:00:1f.2<span style="color: #000000; font-weight: bold;">/</span>host0<span style="color: #000000; font-weight: bold;">/</span>target0:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span>block<span style="color: #000000; font-weight: bold;">/</span>sda<span style="color: #000000; font-weight: bold;">/</span>sda1
  driver          : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  action          : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  seqnum          : <span style="color: #000000;">0</span>
  device_type     : <span style="color: #000000;">98</span>
  device_number   : <span style="color: #000000;">2049</span>
  device_file     : <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda1
&nbsp;
  subsystem       : block
  devtype         : disk
  name            : sr0
  number          : <span style="color: #000000;">0</span>
  sysfs_path      : <span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>devices<span style="color: #000000; font-weight: bold;">/</span>pci0000:00<span style="color: #000000; font-weight: bold;">/</span>0000:00:1f.2<span style="color: #000000; font-weight: bold;">/</span>host5<span style="color: #000000; font-weight: bold;">/</span>target5:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span>block<span style="color: #000000; font-weight: bold;">/</span>sr0
  driver          : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  action          : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  seqnum          : <span style="color: #000000;">0</span>
  device_type     : <span style="color: #000000;">98</span>
  device_number   : <span style="color: #000000;">2816</span>
  device_file     : <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sr0</pre></div></div>

<p>위 출력에서는 일반 디스크 장치(<code>/dev/sda</code>)와 디스크 파티션(<code>/dev/sda1</code>), DVD-RW 장치(<code>/dev/sr0</code>)가 있음을 보여줍니다. 여기서 만일 일반 USB 플래시 메모리를 삽입하면 다음과 같은 결과가 출력됩니다.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>action:add<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  subsystem       : usb
  devtype         : usb_interface
  name            : <span style="color: #000000;">2</span>-<span style="color: #000000;">3</span>:<span style="color: #000000;">1.0</span>
  number          : <span style="color: #000000;">0</span>
  sysfs_path      : <span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>devices<span style="color: #000000; font-weight: bold;">/</span>pci0000:00<span style="color: #000000; font-weight: bold;">/</span>0000:00:1d.7<span style="color: #000000; font-weight: bold;">/</span>usb2<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>-<span style="color: #000000;">3</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>-<span style="color: #000000;">3</span>:<span style="color: #000000;">1.0</span>
  driver          : usb-storage
  action          : add
  seqnum          : <span style="color: #000000;">1934</span>
  device_type     : <span style="color: #000000;">0</span>
  device_number   : <span style="color: #000000;">0</span>
  device_file     : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>action:add<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  subsystem       : scsi
  devtype         : scsi_device
  name            : <span style="color: #000000;">17</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>
  number          : <span style="color: #000000;">0</span>
  sysfs_path      : <span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>devices<span style="color: #000000; font-weight: bold;">/</span>pci0000:00<span style="color: #000000; font-weight: bold;">/</span>0000:00:1d.7<span style="color: #000000; font-weight: bold;">/</span>usb2<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>-<span style="color: #000000;">3</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>-<span style="color: #000000;">3</span>:<span style="color: #000000;">1.0</span><span style="color: #000000; font-weight: bold;">/</span>host17<span style="color: #000000; font-weight: bold;">/</span>target17:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">17</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>
  driver          : sd
  action          : add
  seqnum          : <span style="color: #000000;">1938</span>
  device_type     : <span style="color: #000000;">0</span>
  device_number   : <span style="color: #000000;">0</span>
  device_file     : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>action:change<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  subsystem       : scsi
  devtype         : scsi_device
  name            : <span style="color: #000000;">17</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>
  number          : <span style="color: #000000;">0</span>
  sysfs_path      : <span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>devices<span style="color: #000000; font-weight: bold;">/</span>pci0000:00<span style="color: #000000; font-weight: bold;">/</span>0000:00:1d.7<span style="color: #000000; font-weight: bold;">/</span>usb2<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>-<span style="color: #000000;">3</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>-<span style="color: #000000;">3</span>:<span style="color: #000000;">1.0</span><span style="color: #000000; font-weight: bold;">/</span>host17<span style="color: #000000; font-weight: bold;">/</span>target17:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">17</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>
  driver          : sd
  action          : change
  seqnum          : <span style="color: #000000;">1944</span>
  device_type     : <span style="color: #000000;">0</span>
  device_number   : <span style="color: #000000;">0</span>
  device_file     : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>action:add<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  subsystem       : block
  devtype         : disk
  name            : sdc
  number          : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  sysfs_path      : <span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>devices<span style="color: #000000; font-weight: bold;">/</span>pci0000:00<span style="color: #000000; font-weight: bold;">/</span>0000:00:1d.7<span style="color: #000000; font-weight: bold;">/</span>usb2<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>-<span style="color: #000000;">3</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>-<span style="color: #000000;">3</span>:<span style="color: #000000;">1.0</span><span style="color: #000000; font-weight: bold;">/</span>host17<span style="color: #000000; font-weight: bold;">/</span>target17:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">17</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span>block<span style="color: #000000; font-weight: bold;">/</span>sdc
  driver          : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  action          : add
  seqnum          : <span style="color: #000000;">1945</span>
  device_type     : <span style="color: #000000;">98</span>
  device_number   : <span style="color: #000000;">2080</span>
  device_file     : <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdc
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>action:add<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  subsystem       : block
  devtype         : partition
  name            : sdc1
  number          : <span style="color: #000000;">1</span>
  sysfs_path      : <span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>devices<span style="color: #000000; font-weight: bold;">/</span>pci0000:00<span style="color: #000000; font-weight: bold;">/</span>0000:00:1d.7<span style="color: #000000; font-weight: bold;">/</span>usb2<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>-<span style="color: #000000;">3</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>-<span style="color: #000000;">3</span>:<span style="color: #000000;">1.0</span><span style="color: #000000; font-weight: bold;">/</span>host17<span style="color: #000000; font-weight: bold;">/</span>target17:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">17</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span>block<span style="color: #000000; font-weight: bold;">/</span>sdc<span style="color: #000000; font-weight: bold;">/</span>sdc1
  driver          : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  action          : add
  seqnum          : <span style="color: #000000;">1946</span>
  device_type     : <span style="color: #000000;">98</span>
  device_number   : <span style="color: #000000;">2081</span>
  device_file     : <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdc1</pre></div></div>

<p>위 예제 소스 코드에서 감시하기 위해 지정한  서브 시스템 모두의 변화를 보여주다보니 복잡해 보이지만, 결국 USB 플래시 메모리가 USB / SCSI / BLOCK 서브시스템에 모두 정상적으로 감지되는 걸 확인할 수 있습니다. 다시 장치를 제거하면 다음과 같이 출력됩니다.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>action:remove<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  subsystem       : block
  devtype         : disk
  name            : sdc
  number          : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  sysfs_path      : <span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>devices<span style="color: #000000; font-weight: bold;">/</span>pci0000:00<span style="color: #000000; font-weight: bold;">/</span>0000:00:1d.7<span style="color: #000000; font-weight: bold;">/</span>usb2<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>-<span style="color: #000000;">3</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>-<span style="color: #000000;">3</span>:<span style="color: #000000;">1.0</span><span style="color: #000000; font-weight: bold;">/</span>host16<span style="color: #000000; font-weight: bold;">/</span>target16:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">16</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span>block<span style="color: #000000; font-weight: bold;">/</span>sdc
  driver          : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  action          : remove
  seqnum          : <span style="color: #000000;">1926</span>
  device_type     : <span style="color: #000000;">0</span>
  device_number   : <span style="color: #000000;">2080</span>
  device_file     : <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdc
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>action:remove<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  subsystem       : scsi
  devtype         : scsi_device
  name            : <span style="color: #000000;">16</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>
  number          : <span style="color: #000000;">0</span>
  sysfs_path      : <span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>devices<span style="color: #000000; font-weight: bold;">/</span>pci0000:00<span style="color: #000000; font-weight: bold;">/</span>0000:00:1d.7<span style="color: #000000; font-weight: bold;">/</span>usb2<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>-<span style="color: #000000;">3</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>-<span style="color: #000000;">3</span>:<span style="color: #000000;">1.0</span><span style="color: #000000; font-weight: bold;">/</span>host16<span style="color: #000000; font-weight: bold;">/</span>target16:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">16</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span>
  driver          : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  action          : remove
  seqnum          : <span style="color: #000000;">1927</span>
  device_type     : <span style="color: #000000;">0</span>
  device_number   : <span style="color: #000000;">0</span>
  device_file     : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span>action:remove<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  subsystem       : usb
  devtype         : usb_interface
  name            : <span style="color: #000000;">2</span>-<span style="color: #000000;">3</span>:<span style="color: #000000;">1.0</span>
  number          : <span style="color: #000000;">0</span>
  sysfs_path      : <span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>devices<span style="color: #000000; font-weight: bold;">/</span>pci0000:00<span style="color: #000000; font-weight: bold;">/</span>0000:00:1d.7<span style="color: #000000; font-weight: bold;">/</span>usb2<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>-<span style="color: #000000;">3</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>-<span style="color: #000000;">3</span>:<span style="color: #000000;">1.0</span>
  driver          : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  action          : remove
  seqnum          : <span style="color: #000000;">1931</span>
  device_type     : <span style="color: #000000;">0</span>
  device_number   : <span style="color: #000000;">0</span>
  device_file     : <span style="color: #7a0874; font-weight: bold;">&#40;</span>null<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>이 정보를 실제로 어떻게 활용할지는 이제 어플리케이션에게 달린 몫입니다.</p>
]]></content:encoded>
			<wfw:commentRss>http://lethean.pe.kr/2011/03/07/using-gudev/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.0/kr/</creativeCommons:license>
	</item>
		<item>
		<title>GLib 2.26.0 출시</title>
		<link>http://lethean.pe.kr/2010/10/02/glib-2-26-0-release/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=glib-2-26-0-release&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=glib-2-26-0-%25ec%25b6%259c%25ec%258b%259c</link>
		<comments>http://lethean.pe.kr/2010/10/02/glib-2-26-0-release/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=glib-2-26-0-release#comments</comments>
		<pubDate>Sat, 02 Oct 2010 05:36:23 +0000</pubDate>
		<dc:creator>lethean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[GLib]]></category>
		<category><![CDATA[카스탈리엔]]></category>

		<guid isPermaLink="false">http://lethean.pe.kr/?p=1451</guid>
		<description><![CDATA[GLib 2.26.0 안정버전이 출시되었습니다. 한동안 개인적으로 관심있는 업데이트가 없어서 정리를 안 했는데, 이번 업데이트는 흥미로운 기능이 매우 많이 추가되어 있어 관심을 가질 수 밖에 없... <a href="http://lethean.pe.kr/2010/10/02/glib-2-26-0-release/?utm_source=rss&#38;utm_medium=rss&#38;utm_campaign=glib-2-26-0-release">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[GLib 2.26.0 안정버전이 출시되었습니다. 한동안 개인적으로 관심있는 업데이트가 없어서 정리를 안 했는데, 이번 업데이트는 흥미로운 기능이 매우 많이 추가되어 있어 관심을 가질 수 밖에 없을 것 같습니다. 전반적으로 2011년 4월 예정인 GNOME 3 환경을 목표로 계속 개발중인 GTK+ 3.0에 초점이 &#8230; <a href="http://lethean.pe.kr/2010/10/02/glib-2-26-0-release/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></content:encoded>
			<wfw:commentRss>http://lethean.pe.kr/2010/10/02/glib-2-26-0-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.0/kr/</creativeCommons:license>
	</item>
		<item>
		<title>GObject 속성 직렬화(Serialization)하기</title>
		<link>http://lethean.pe.kr/2010/04/07/serialize-gobject-properties/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=serialize-gobject-properties&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gobject-%25ec%2586%258d%25ec%2584%25b1-%25ec%25a7%2581%25eb%25a0%25ac%25ed%2599%2594serialization%25ed%2595%2598%25ea%25b8%25b0</link>
		<comments>http://lethean.pe.kr/2010/04/07/serialize-gobject-properties/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=serialize-gobject-properties#comments</comments>
		<pubDate>Wed, 07 Apr 2010 12:33:58 +0000</pubDate>
		<dc:creator>lethean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[GLib]]></category>
		<category><![CDATA[카스탈리엔]]></category>

		<guid isPermaLink="false">http://lethean.pe.kr/?p=1273</guid>
		<description><![CDATA[GObject 객체의 속성(properties)을 자동으로 저장하고 다시 자동으로 불러들이는 일련의 작업을 자동화할 수 있다면 편하지 않을까 생각해 본 적이 있을겁니다. 이러한 과정을 직렬화(serialization) <a href="http://lethean.pe.kr/2010/04/07/serialize-gobject-properties/?utm_source=rss&#38;utm_medium=rss&#38;utm_campaign=serialize-gobject-properties">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[GObject 객체의 속성(properties)을 자동으로 저장하고 다시 자동으로 불러들이는 일련의 작업을 자동화할 수 있다면 편하지 않을까 생각해 본 적이 있을겁니다. 이러한 과정을 직렬화(serialization)라고 부른다면, 오브젝티브-C, 자바 등과 같은 많은 언어가 이미 기본적으로 직렬화를 지원하거나 관련 라이브러리를 제공하고 있는만큼, GObject 객체 직렬화 &#8230; <a href="http://lethean.pe.kr/2010/04/07/serialize-gobject-properties/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></content:encoded>
			<wfw:commentRss>http://lethean.pe.kr/2010/04/07/serialize-gobject-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.0/kr/</creativeCommons:license>
	</item>
		<item>
		<title>GLib 테스트 프레임워크 사용하기</title>
		<link>http://lethean.pe.kr/2010/02/12/using-glib-test-framework/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-glib-test-framework&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=glib-%25ed%2585%258c%25ec%258a%25a4%25ed%258a%25b8-%25ed%2594%2584%25eb%25a0%2588%25ec%259e%2584%25ec%259b%258c%25ed%2581%25ac-%25ec%2582%25ac%25ec%259a%25a9%25ed%2595%2598%25ea%25b8%25b0</link>
		<comments>http://lethean.pe.kr/2010/02/12/using-glib-test-framework/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-glib-test-framework#comments</comments>
		<pubDate>Thu, 11 Feb 2010 18:33:45 +0000</pubDate>
		<dc:creator>lethean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Clutter]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[GLib]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[카스탈리엔]]></category>

		<guid isPermaLink="false">http://lethean.pe.kr/?p=1236</guid>
		<description><![CDATA[GLib 라이브러리 2.16 버전부터 지원하는 테스트 프레임워크는 C 언어용 유닛테스트 도구입니다. 물론 많은 유닛 테스트 도구가 이미 존재하지만, GLib 라이브러리 기반 C 언어 프로그램이라면  <a href="http://lethean.pe.kr/2010/02/12/using-glib-test-framework/?utm_source=rss&#38;utm_medium=rss&#38;utm_campaign=using-glib-test-framework">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[GLib 라이브러리 2.16 버전부터 지원하는 테스트 프레임워크는 C 언어용 유닛테스트 도구입니다. 물론 많은 유닛 테스트 도구가 이미 존재하지만, GLib 라이브러리 기반 C 언어 프로그램이라면 굳이 다른 라이브러리를 사용하는 것보다는 이미 지원하는 훌륭한 도구를 사용하는게 더 좋겠지요. 참고로, GTK+, Clutter 등 &#8230; <a href="http://lethean.pe.kr/2010/02/12/using-glib-test-framework/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></content:encoded>
			<wfw:commentRss>http://lethean.pe.kr/2010/02/12/using-glib-test-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.0/kr/</creativeCommons:license>
	</item>
		<item>
		<title>싱글턴(Singleton) GObject 객체 만들기</title>
		<link>http://lethean.pe.kr/2010/02/11/how-to-make-a-gobject-singleton/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-make-a-gobject-singleton&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=%25ec%258b%25b1%25ea%25b8%2580%25ed%2584%25b4singleton-gobject-%25ea%25b0%259d%25ec%25b2%25b4-%25eb%25a7%258c%25eb%2593%25a4%25ea%25b8%25b0</link>
		<comments>http://lethean.pe.kr/2010/02/11/how-to-make-a-gobject-singleton/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-make-a-gobject-singleton#comments</comments>
		<pubDate>Thu, 11 Feb 2010 14:46:45 +0000</pubDate>
		<dc:creator>lethean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[GLib]]></category>
		<category><![CDATA[카스탈리엔]]></category>

		<guid isPermaLink="false">http://lethean.pe.kr/?p=1244</guid>
		<description><![CDATA[좋은 블로그 포스트가 올라왔길래, 우리말로 정리해 보았습니다. GObject 기반 객체 지향 프로그래밍에서 싱글턴 패턴을 사용하려면 대개 다음과 같은 함수를 추가합니다. FooBar* foo_bar_get_default... <a href="http://lethean.pe.kr/2010/02/11/how-to-make-a-gobject-singleton/?utm_source=rss&#38;utm_medium=rss&#38;utm_campaign=how-to-make-a-gobject-singleton">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[좋은 블로그 포스트가 올라왔길래, 우리말로 정리해 보았습니다. GObject 기반 객체 지향 프로그래밍에서 싱글턴 패턴을 사용하려면 대개 다음과 같은 함수를 추가합니다. FooBar* foo_bar_get_default &#40;void&#41; &#123; static FooBar *self = NULL; &#160; if &#40;self == NULL&#41; self = foo_bar_new &#40;&#41;; &#160; return &#8230; <a href="http://lethean.pe.kr/2010/02/11/how-to-make-a-gobject-singleton/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></content:encoded>
			<wfw:commentRss>http://lethean.pe.kr/2010/02/11/how-to-make-a-gobject-singleton/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.0/kr/</creativeCommons:license>
	</item>
		<item>
		<title>GLib 2.22.0 출시</title>
		<link>http://lethean.pe.kr/2009/09/24/glib-2-22-0-release/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=glib-2-22-0-%25ec%25b6%259c%25ec%258b%259c</link>
		<comments>http://lethean.pe.kr/2009/09/24/glib-2-22-0-release/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 16:16:16 +0000</pubDate>
		<dc:creator>lethean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[GLib]]></category>

		<guid isPermaLink="false">http://lethean.pe.kr/?p=1096</guid>
		<description><![CDATA[GLib 2.22.0 안정버전 출시 소식이 도착했습니다. 물론 GTK+ 2.18.0 버전도 함께 출시되었지만 이 포스트에서는 일단 GLib에 대한 내용만 다루고, GTK+ 변경사항은 다른 포스트에서 정리할 예정입니다. 물론 그대로 우리말로 옮기는 건 지루하고 재미없는 작업이라, 한두가지 눈에 띄는 것만 정리합니다.
제일 먼저 눈에 띄는 추가 사항은, 이전 포스트에서 언급했던 GMainContext 객체를 쓰레드별로 자동 관리해주는 API가 추가되었다는 점입니다. 새로 [...] <a href="http://lethean.pe.kr/2009/09/24/glib-2-22-0-release/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[GLib 2.22.0 안정버전 출시 소식이 도착했습니다. 물론 GTK+ 2.18.0 버전도 함께 출시되었지만 이 포스트에서는 일단 GLib에 대한 내용만 다루고, GTK+ 변경사항은 다른 포스트에서 정리할 예정입니다. 물론 그대로 우리말로 옮기는 건 지루하고 재미없는 작업이라, 한두가지 눈에 띄는 것만 정리합니다.
제일 먼저 눈에 띄는 추가 사항은, 이전 포스트에서 언급했던 GMainContext 객체를 쓰레드별로 자동 관리해주는 API가 추가되었다는 점입니다. 새로 [...]]]></content:encoded>
			<wfw:commentRss>http://lethean.pe.kr/2009/09/24/glib-2-22-0-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.0/kr/</creativeCommons:license>
	</item>
		<item>
		<title>GLib 메인루프 이용하기</title>
		<link>http://lethean.pe.kr/2009/09/21/using-glib-mainloop/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=glib-%25eb%25a9%2594%25ec%259d%25b8%25eb%25a3%25a8%25ed%2594%2584-%25ec%259d%25b4%25ec%259a%25a9%25ed%2595%2598%25ea%25b8%25b0</link>
		<comments>http://lethean.pe.kr/2009/09/21/using-glib-mainloop/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 09:32:05 +0000</pubDate>
		<dc:creator>lethean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[GLib]]></category>
		<category><![CDATA[GTK+]]></category>

		<guid isPermaLink="false">http://lethean.pe.kr/?p=1082</guid>
		<description><![CDATA[GLib API를 이용한 멀티쓰레드 프로그래밍에서 비동기 메시지 큐를 이용하는 방법은 지난 포스트에서 설명한 적이 있는데, 이번에는 애플 GCD의 libdispatch와 비교되는 GLib의 메인루프를 이용하는 방법을 정리해 보았습니다. 이 방법은 어떤 관점에서 보면 더 쉽고, 이미 많은 기능이 기본적으로 지원되기 때문에 몇몇 경우를 제외하면 더 좋은 방법입니다. 다만 API 사용법을 이해하기가 처음에 조금 까다롭다는 점이 걸림돌입니다.
일반적으로 GLib [...] <a href="http://lethean.pe.kr/2009/09/21/using-glib-mainloop/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[GLib API를 이용한 멀티쓰레드 프로그래밍에서 비동기 메시지 큐를 이용하는 방법은 지난 포스트에서 설명한 적이 있는데, 이번에는 애플 GCD의 libdispatch와 비교되는 GLib의 메인루프를 이용하는 방법을 정리해 보았습니다. 이 방법은 어떤 관점에서 보면 더 쉽고, 이미 많은 기능이 기본적으로 지원되기 때문에 몇몇 경우를 제외하면 더 좋은 방법입니다. 다만 API 사용법을 이해하기가 처음에 조금 까다롭다는 점이 걸림돌입니다.
일반적으로 GLib [...]]]></content:encoded>
			<wfw:commentRss>http://lethean.pe.kr/2009/09/21/using-glib-mainloop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.0/kr/</creativeCommons:license>
	</item>
		<item>
		<title>GLib 메인루프와 애플 GCD의 libdispatch</title>
		<link>http://lethean.pe.kr/2009/09/17/glib-mainloop-vs-libdispatch-of-apple-gcd/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=glib-%25eb%25a9%2594%25ec%259d%25b8%25eb%25a3%25a8%25ed%2594%2584%25ec%2599%2580-%25ec%2595%25a0%25ed%2594%258c-gcd%25ec%259d%2598-libdispatch</link>
		<comments>http://lethean.pe.kr/2009/09/17/glib-mainloop-vs-libdispatch-of-apple-gcd/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 02:40:00 +0000</pubDate>
		<dc:creator>lethean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[GLib]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[MacOSX]]></category>

		<guid isPermaLink="false">http://lethean.pe.kr/?p=1073</guid>
		<description><![CDATA[GTK 메일링 리스트에 흥미있는 포스트가 있어서 정리해 봅니다.
스노우 레오파드 출시와 더불어 오픈 소스로 공개되면서 요즘 한창 이슈가 되고 있는 애플의 GCD(Grand Central Dispatch)의 일부인 libdispatch 라이브러리와 GLib 메인루프를 비교한 내용인데, 정리해 보면 다음과 같습니다.
libdispatch는 세 종류의 실행 큐를 제공하는데 다음과 같습니다.

메인 큐(main queue) : GLib의 메인 이벤트 루프와 동일
전역 큐(global queue) : 쓰레드풀(thread pool) 방식으로 동작하며 [...] <a href="http://lethean.pe.kr/2009/09/17/glib-mainloop-vs-libdispatch-of-apple-gcd/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[GTK 메일링 리스트에 흥미있는 포스트가 있어서 정리해 봅니다.
스노우 레오파드 출시와 더불어 오픈 소스로 공개되면서 요즘 한창 이슈가 되고 있는 애플의 GCD(Grand Central Dispatch)의 일부인 libdispatch 라이브러리와 GLib 메인루프를 비교한 내용인데, 정리해 보면 다음과 같습니다.
libdispatch는 세 종류의 실행 큐를 제공하는데 다음과 같습니다.

메인 큐(main queue) : GLib의 메인 이벤트 루프와 동일
전역 큐(global queue) : 쓰레드풀(thread pool) 방식으로 동작하며 [...]]]></content:encoded>
			<wfw:commentRss>http://lethean.pe.kr/2009/09/17/glib-mainloop-vs-libdispatch-of-apple-gcd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.0/kr/</creativeCommons:license>
	</item>
		<item>
		<title>GObject 객체 지향 프로그래밍 (4)</title>
		<link>http://lethean.pe.kr/2009/08/24/oop-with-gobject-4/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gobject-%25ea%25b0%259d%25ec%25b2%25b4-%25ec%25a7%2580%25ed%2596%25a5-%25ed%2594%2584%25eb%25a1%259c%25ea%25b7%25b8%25eb%259e%2598%25eb%25b0%258d-4</link>
		<comments>http://lethean.pe.kr/2009/08/24/oop-with-gobject-4/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 05:07:11 +0000</pubDate>
		<dc:creator>lethean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[GLib]]></category>
		<category><![CDATA[GTK+]]></category>

		<guid isPermaLink="false">http://lethean.pe.kr/?p=1018</guid>
		<description><![CDATA[이전 글에 계속 이어집니다.
객체 속성 정보 얻기
EdcHost 객체의 속성 정보를 실행 중에 얻어볼까 합니다.
왜 또 갑자기 불필요한 예제를 꺼내냐고 물어보실 분이 있을 것 같아 말하자면, 가끔 요긴한 경우가 있기 때문입니다. 예를 들어 EdcHost 객체를 상속받은 EdcHostDoosan, EdcHostKia, EdcHostLitte 객체가 여러 개 존재할 경우, 이 객체들은 EdcHost의 공통 속성 뿐 아니라 본인의 속성도 따로 가집니다. 이러한 [...] <a href="http://lethean.pe.kr/2009/08/24/oop-with-gobject-4/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[이전 글에 계속 이어집니다.
객체 속성 정보 얻기
EdcHost 객체의 속성 정보를 실행 중에 얻어볼까 합니다.
왜 또 갑자기 불필요한 예제를 꺼내냐고 물어보실 분이 있을 것 같아 말하자면, 가끔 요긴한 경우가 있기 때문입니다. 예를 들어 EdcHost 객체를 상속받은 EdcHostDoosan, EdcHostKia, EdcHostLitte 객체가 여러 개 존재할 경우, 이 객체들은 EdcHost의 공통 속성 뿐 아니라 본인의 속성도 따로 가집니다. 이러한 [...]]]></content:encoded>
			<wfw:commentRss>http://lethean.pe.kr/2009/08/24/oop-with-gobject-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.0/kr/</creativeCommons:license>
	</item>
	</channel>
</rss>

