PDF Open Source Messaging Application Development Building and Extending Gaim 1st Edition Sean Egan download
PDF Open Source Messaging Application Development Building and Extending Gaim 1st Edition Sean Egan download
com
https://ebookname.com/product/open-source-messaging-
application-development-building-and-extending-gaim-1st-
edition-sean-egan/
OR CLICK BUTTON
DOWNLOAD EBOOK
https://ebookname.com/product/enterprise-integration-patterns-
designing-building-and-deploying-messaging-solutions-1st-edition-
hohpe/
ebookname.com
https://ebookname.com/product/climate-change-science-and-policy-1st-
edition-stephen-h-schneider/
ebookname.com
Comparative Social Policy Theory and Research Introducing
Social Policy 1st Edition Patricia Kennett
https://ebookname.com/product/comparative-social-policy-theory-and-
research-introducing-social-policy-1st-edition-patricia-kennett/
ebookname.com
https://ebookname.com/product/unequal-britain-pat-thane/
ebookname.com
https://ebookname.com/product/case-studies-in-emergency-medicine-1st-
edition-rebecca-jeanmonod-md/
ebookname.com
https://ebookname.com/product/master-traders-strategies-for-superior-
returns-from-today-s-top-traders-1st-edition-fari-hamzei/
ebookname.com
https://ebookname.com/product/explaining-social-behavior-more-nuts-
and-bolts-for-the-social-sciences-elster/
ebookname.com
Egan_467-3Front.fm Page i Monday, June 27, 2005 11:00 AM
For Dad
Egan_467-3Front.fm Page iv Monday, June 27, 2005 11:00 AM
Egan_467-3Front.fm Page v Monday, June 27, 2005 11:00 AM
Contents at a Glance
INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
v
Egan_467-3Front.fm Page vi Monday, June 27, 2005 11:00 AM
Egan_467-3Front.fm Page vii Monday, June 27, 2005 11:00 AM
Contents
History of IM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
History of Gaim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Setting Up Your Build Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Cygwin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
MinGW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Library Dependencies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Getting Gaim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Configuring Gaim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Compiling Gaim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Using Gaim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Adding a New Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Buddy List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Conversations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
viii ■C O N T E N T S
■C O N T E N T S ix
x ■C O N T E N T S
■C O N T E N T S xi
xii ■C O N T E N T S
■C O N T E N T S xiii
■INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Egan_467-3Front.fm Page xiv Monday, June 27, 2005 11:00 AM
Egan_467-3Front.fm Page xv Monday, June 27, 2005 11:00 AM
xv
Egan_467-3Front.fm Page xvi Monday, June 27, 2005 11:00 AM
Egan_467-3Front.fm Page xvii Monday, June 27, 2005 11:00 AM
■NATHAN WALP is a software engineer at Recognition Research, Inc. in Blacksburg, VA. He has
more than five years experience writing software, and has been working on Gaim since 2001; he
is responsible for Jabber support, among many other things.
xvii
Egan_467-3Front.fm Page xviii Monday, June 27, 2005 11:00 AM
Egan_467-3Front.fm Page xix Monday, June 27, 2005 11:00 AM
Acknowledgments
I ’d like to thank my friends and family for their support while I was writing this book, especially
my parents Doug and Lynn, and my sister Erin.
I’d like to thank everyone at Apress for their support and patience with me, especially
those I worked with directly: Beth Christmas, Jason Gilmore, Candace English, Julie Miller,
and Kelly Winquist.
Mostly, I’d like to thank everyone who’s contributed to Gaim, making this book possible;
especially Nathan Walp (who is also the technical reviewer for this book), Mark Spencer,
Jim Duchek, Rob Flynn, Syd Logan, Eric Warmenhoven, Adam Fritzler, Benjamin Miller,
Decklin Foster, Mark Doliner, Luke Schierer, Ethan Blanton, Etan Reisner, Tim Ringenbach,
Daniel Atallah, Robert McQueen, Christian Hammond, Herman Bloggs, Stu Tomlinson,
Gary Kramlich, Ka-Hing Cheung, Kevin Stange, and Felipe Contreras.
xix
Egan_467-3Front.fm Page xx Monday, June 27, 2005 11:00 AM
Egan_467-3Front.fm Page xxi Monday, June 27, 2005 11:00 AM
Introduction
I discovered Gaim in the AOL Instant Messenger (AIM) user profile of a friend about five years
ago. I didn’t know a lot about Linux then. I knew that it was a free implementation of UNIX with
publicly available source code, but my previous experiences with UNIX comprised staring at a
shell prompt, trying to type cryptic commands into a “DOS-like” console. Likewise, I assumed
that Linux was primitive compared to the high-tech, state-of-the-art Windows 98 I was using
that day when I read my friend’s profile.
“Visit the Gaim Web page,” it invited me. I followed the link and found my preconceptions
were wrong. On what I had seen as a platform solely for Web servers and corporate mainframes,
I could perform such everyday tasks as chatting with my friends. I expected nothing but text
commands, but I found Web browsers, e-mail clients, and games—all with windows to scroll
and buttons to click. Linux no longer looked like DOS; it was an actively developed desktop
operating system. Wanting to contribute to that development process, I quickly downloaded
the Gaim source code and started coding.
At the time, though, I had just started learning how to use my operating system and didn’t
know any C (the language Gaim is written in). This didn’t stop me; I quickly taught myself all the
skills necessary to write this hugely popular desktop application, using Gaim as an example.
Today, I’m the lead developer of the Gaim project, and I work closely with a group of developers
to maintain and enhance the most popular open source instant messaging application on the
planet.
About Gaim
Gaim is a modular instant messaging client that supports a wide variety of IM protocols,
including AIM, ICQ, MSN, Yahoo!, and Jabber. Although it was originally written for Linux, it
now runs on most popular operating systems, including Windows and Mac OS X. Although
exact user statistics are impossible to obtain, its users number in the hundreds of thousands, if
not over a million. It’s so popular because, in addition to functionality available in other clients,
it offers many unique features and is infinitely extensible through a powerful plug-in API. Most
importantly in the context of this book is that Gaim is free and open source software.
xxi
Egan_467-3Front.fm Page xxii Monday, June 27, 2005 11:00 AM
xxii ■I N T R O D U C T I O N
“Free software” and “open source software” are terms that differ slightly in semantics but
describe essentially the same thing. When downloading Gaim, you are offered the source code.
Having unfettered access to the source code is quite valuable for understanding how Gaim
works, and is necessary should you wish to make any modifications. The only major provision
is that you grant this same right to modify your changes. This way, Gaim benefits from
hundreds of talented developers around the world, offering their contributions back to the
community. Because Gaim is built entirely with open source tools, involving yourself in its
development is easy, and it makes an excellent example to learn from.
■I N T R O D U C T I O N xxiii
This book will also introduce network programming. You will learn what sockets are and
how to use them to make your applications communicate over the Internet. I’ll also introduce
you to a concept known as reverse engineering, showing you how to capture and interpret
network traffic so that your application can speak otherwise-closed, proprietary protocols.
I’ll examine different ways to make sure that your applications are accessible to everyone,
regardless of what kind of computer they’re running on (portability) and what languages your
users speak (internationalization). I’ll also discuss some of the important differences between
platforms, and you will learn about how computers store text. We will look at the gettext
system, which allows your application to be translated to other languages.
Throughout, I’ll examine useful coding techniques implemented within Gaim to make
programming in C and managing a large project easier. A per-chapter breakdown of the mate-
rial covered in this book follows.
xxiv ■I N T R O D U C T I O N
Chapter 7: Sockets
In Chapter 7, I’ll introduce sockets, the programmatic interface to the Internet. You will learn
some basic principles of networking, and how to communicate over a network. I will explain
how to hook your networking code to GTK+’s GLib library to integrate it into GTK+’s main loop
and ensure cross-platform compatibility.
Chapter 9: Internationalization
In this chapter, you will learn how to write programs that speakers of any language can use. I
will review the gettext system for providing translation of your program at runtime. I will
explain the concept of text encodings, why they are significant, and how to write code that
understands them.
Prerequisites
I mentioned that when I started working on Gaim I was a complete amateur who didn’t even
know the language it’s programmed in. As such, I don’t expect you to be very experienced
either. You’ll learn as we go.
However, I won’t be introducing basic concepts of C, the language used to build Gaim.
Therefore,you should possess at least a rudimentary understanding of the language, and have
a basic knowledge of underlying principles of computer programming. Although I learned C by
example, there are other books that will do a better job of teaching you This book will focus on
higher-level aspects of the development process. However, you can most likely get by with
knowing C++, Java, or another language with a C-like syntax, as I will elaborate on more-
difficult or obscure techniques.
Random documents with unrelated
content Scribd suggests to you:
pergamino le había de volver á ver entre sus
mesnadas desnudo el acero en la diestra,
encarnizados los ojos de cólera contra su real sobrino
ó firmando tan frescamente alianza con el moro
enemigo de España ó desnaturalizándose de su
patria como un forajido? He aquí un caso en que la
vida y carácter de un escritor no solamente no
concuerdan y aclaran sus escritos, sino que los
contradicen de todo en todo. Este guerrero, este
vengativo, este hombre de violentísimas pasiones y
desgarrado proceder, escribe con la gravedad de
Séneca y la candidez de un niño inocente.
De esto resulta que son trece los libros que él nombra; el catorce de
la lista lo publicó Gayangos, y Amador de los Ríos le da el título de
"Libro sobre la Fe, intitulado ó Fray Remon de Masquefa, que tal vez
sea el omitido por el copiante al transferir el prólogo general de
todas las obras" (Hist. crít. de la Liter. Esp., 1863, t. IV, pág. 234).
Argote de Molina publicó el Conde Lucanor en Sevilla, 1575, del cual
se han hecho otras ediciones: Madrid, 1642; Stuttgart, 1840;
Barcelona, 1853. Pero la mejor es la de Knust, Leipzig, 1900, sacada
del mejor códice (Bibl. Nac., 6.376, antes S-34); la de Krapf, Vigo,
1902, reproduce el códice del Conde de Puñonrostro, hoy de la
Academia Española, sin las adiciones de los otros, aunque sólo tiene
la primera parte. Los códices son, además de los dos citados, otro de
la Nacional (4.236, antes M-100), el de Gayangos, hoy en la Nacional
(1.190), y el de la Academia de la Historia (Est. 27, gr. 3, E-78).
Gayangos dió á luz los números 4, 1, 2, 3, 13, 14. José Gutiérrez de
la Vega publicó el Libro de la Caza, Bibl. Venatoria, Madrid, 1879.