wmcapshare: Add version 0.1 to repository.

From
https://web.archive.org/web/20061215141801/http://www.netjunki.org/projects/wmcapshare-0.1.tar.gz
This commit is contained in:
Doug Torrance 2016-12-03 16:49:51 -05:00 committed by Carlos R. Mafra
parent 778ce8ae45
commit ee10905069
48 changed files with 2152 additions and 0 deletions

6
wmcapshare/AUTHORS Normal file
View file

@ -0,0 +1,6 @@
Ben Moore <ben@netjunki.org>
Code Samples:
Pontus Fuchs <pontus.fuchs@tactel.se> (openobex communication)
A.Sleep <a.sleep@asleep.net> (libdockapp example)
Stephen Crane <jscrane@maths.tcd.ie> (character set from wmseti)

340
wmcapshare/COPYING Normal file
View file

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

4
wmcapshare/ChangeLog Normal file
View file

@ -0,0 +1,4 @@
0.1: First release
- basic capshare opperations (recieve file(s))
- first pass on interface (animation experiment, font handler)
- initial artwork

7
wmcapshare/INSTALL Normal file
View file

@ -0,0 +1,7 @@
To Install wmcapshare just modify the Makefile to conform to your
environment. And run make. make install.
wmcapshare depends on
libdockapp 0.4
openobex 0.9.8
glib 1.2

26
wmcapshare/Makefile Normal file
View file

@ -0,0 +1,26 @@
CC = gcc
bindir = /usr/local/bin
OPENOBEX_CONFIG = /usr/local/bin/openobex-config
GLIB_CONFIG = /usr/bin/glib-config
all: wmcapshare
wmcapshare: wmcapshare.o obex_io.o obex_put_common.o
$(CC) `$(OPENOBEX_CONFIG) --libs` `$(GLIB_CONFIG) --libs` -o wmcapshare -ldockapp *.o
wmcapshare.o: wmcapshare.h wmcapshare.c version.h
$(CC) `$(GLIB_CONFIG) --cflags` -c wmcapshare.c
obex_io.o: obex_io.c obex_io.h
$(CC) `$(GLIB_CONFIG) --cflags` -c obex_io.c
obex_put_common.o: obex_put_common.c obex_put_common.h
$(CC) `$(GLIB_CONFIG) --cflags` -c obex_put_common.c
clean:
rm -f *.o wmcapshare
install: wmcapshare
cp wmcapshare $(bindir)/wmcapshare

1
wmcapshare/NEWS Normal file
View file

@ -0,0 +1 @@
This is the first release

12
wmcapshare/README Normal file
View file

@ -0,0 +1,12 @@
wmcapshare - a Window Maker dockapp to manage the HP Capshare
Why
I got sick of having to deal with the openobex sample application as my
only interface to my HP Capshare. So I finally sat down and dealt with it.
Also HP recently discontinued the product and no longer support it. I had
been using it with windows when I needed to, but the drivers no longer work
with Win2K.
What
The HP CapShare is a handheld document scanner.
wmcapshare is a dockapp to manage the files you upload

9
wmcapshare/TODO Normal file
View file

@ -0,0 +1,9 @@
TODO:
- get more information from the capshare
- this will make the interface more useful and allow better management
of the captured pages
- display downloaded filename
- make the wait state have an animation(maybe)
- reverse engineer the serial protocol used by the capshare to allow use
without IrDA.
- suggestions?

241
wmcapshare/obex_io.c Normal file
View file

@ -0,0 +1,241 @@
/*********************************************************************
*
* Filename: obex_io.c
* Version: 0.3
* Description: Some useful disk-IO functions
* Status: Experimental.
* Author: Pontus Fuchs <pontus.fuchs@tactel.se>
* Created at: Mon Aug 07 19:32:14 2000
* Modified at: Mon Aug 07 19:32:14 2000
* Modified by: Pontus Fuchs <pontus.fuchs@tactel.se>
* Modified at: Sun Oct 06 10:00:00 2001
* Modified by: Ben Moore <ben@netjunki.org>
*
* Copyright (c) 1999 Dag Brattli, All Rights Reserved.
*
* 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 <stdio.h>
#ifdef _WIN32
#include <io.h>
#include <windows.h>
#else
#include <sys/stat.h>
#include <unistd.h>
#endif /*_WIN32 */
#include <fcntl.h>
#include <string.h>
#include <glib.h>
#include <openobex/obex.h>
#include "obex_io.h"
extern obex_t *handle;
int obex_protocol_type = OBEX_PROTOCOL_GENERIC;
//
// Get the filesize in a "portable" way
//
gint get_filesize(const char *filename)
{
#ifdef _WIN32
HANDLE fh;
gint size;
fh = CreateFile(filename, 0, 0, NULL, OPEN_EXISTING, 0, NULL);
if(fh == INVALID_HANDLE_VALUE) {
g_print("Cannot open %s\n", filename);
return -1;
}
size = GetFileSize(fh, NULL);
g_print("fize size was %d\n", size);
CloseHandle(fh);
return size;
#else
struct stat stats;
/* Need to know the file length */
stat(filename, &stats);
return (gint) stats.st_size;
#endif
}
//
// Read a file and alloc a buffer for it
//
guint8* easy_readfile(const char *filename, int *file_size)
{
int actual;
int fd;
guint8 *buf;
*file_size = get_filesize(filename);
g_print("name=%s, size=%d\n", filename, *file_size);
#ifdef _WIN32
fd = open(filename, O_RDONLY | O_BINARY, 0);
#else
fd = open(filename, O_RDONLY, 0);
#endif
if (fd == -1) {
return NULL;
}
if(! (buf = g_malloc(*file_size)) ) {
return NULL;
}
actual = read(fd, buf, *file_size);
close(fd);
#ifdef _WIN32
if(actual != *file_size) {
g_free(buf);
buf = NULL;
}
#else
*file_size = actual;
#endif
return buf;
}
//
//
//
obex_object_t *build_object_from_file(obex_t *handle, const char *filename)
{
obex_headerdata_t hdd;
guint8 unicode_buf[200];
gint namebuf_len;
obex_object_t *object;
guint32 creator_id;
int file_size;
char *name = NULL;
guint8 *buf;
buf = easy_readfile(filename, &file_size);
if(buf == NULL)
return NULL;
/* Set Memopad as the default creator ID */
creator_id = MEMO_PAD;
/* Find the . in the filename */
name = strchr(filename, '.');
if (name) {
name++;
if (strcmp(name, "vcf") == 0) {
printf( "This is a Address Book file\n");
creator_id = ADDRESS_BOOK;
} else if (strcmp(name, "vcs") == 0) {
printf( "This is a Date Book file\n");
creator_id = DATE_BOOK;
} else if (strcmp(name, "txt") == 0) {
printf("This is a Memo pad file\n");
creator_id = MEMO_PAD;
} else if (strcmp(name, "prc") == 0) {
printf("This is a Pilot resource file\n");
creator_id = PILOT_RESOURCE;
}
}
/* Build object */
object = OBEX_ObjectNew(handle, OBEX_CMD_PUT);
namebuf_len = OBEX_CharToUnicode(unicode_buf, filename, sizeof(unicode_buf));
hdd.bs = unicode_buf;
OBEX_ObjectAddHeader(handle, object, OBEX_HDR_NAME,
hdd, namebuf_len, 0);
hdd.bq4 = file_size;
OBEX_ObjectAddHeader(handle, object, OBEX_HDR_LENGTH,
hdd, sizeof(guint32), 0);
#if 0
/* Optional header for win95 irxfer, allows date to be set on file */
OBEX_ObjectAddHeader(handle, object, OBEX_HDR_TIME2,
(obex_headerdata_t) (guint32) stats.st_mtime,
sizeof(guint32), 0);
#endif
if (obex_protocol_type != 1) {
/* Optional header for Palm Pilot */
/* win95 irxfer does not seem to like this one */
hdd.bq4 = creator_id;
OBEX_ObjectAddHeader(handle, object, HEADER_CREATOR_ID,
hdd, sizeof(guint32), 0);
}
hdd.bs = buf;
OBEX_ObjectAddHeader(handle, object, OBEX_HDR_BODY,
hdd, file_size, 0);
g_free(buf);
return object;
}
/*
* Function safe_save_file ()
*
* First remove path and add "/tmp/". Then save.
*
*/
gint safe_save_file(gchar *name, const guint8 *buf, gint len, gchar *savedir)
{
gchar *s = NULL;
gchar filename[255] = {0,};
gint fd;
gint actual;
g_print("Filename = %s\n", name);
#ifndef _WIN32
sprintf( filename, "%s", savedir);
#endif
s = strrchr(name, '/');
if (s == NULL)
s = name;
else
s++;
strncat(filename, s, 250);
#ifdef _WIN32
fd = open(filename, O_RDWR | O_CREAT, 0);
#else
fd = open(filename, O_RDWR | O_CREAT, DEFFILEMODE);
#endif
if ( fd < 0) {
perror( filename);
return -1;
}
actual = write(fd, buf, len);
close(fd);
g_print( "Wrote %s (%d bytes)\n", filename, actual);
return actual;
}

24
wmcapshare/obex_io.h Normal file
View file

@ -0,0 +1,24 @@
#ifndef OBEX_IO_H
#define OBEX_IO_H
/* Application defined headers */
#define HEADER_CREATOR_ID 0xcf
#define ADDRESS_BOOK 0x61646472 /* "addr" *.vcf */
#define MEMO_PAD 0x6d656d6f /* "memo" *.txt */
#define TO_DO_LIST 0x746f646f /* "todo" *.vcs */
#define DATE_BOOK 0x64617465 /* "date" *.vcs */
#define PILOT_RESOURCE 0x6c6e6368 /* "Inch" *.prc */
gint get_filesize(const char *filename);
obex_object_t *build_object_from_file(obex_t *handle, const char *filename);
gint safe_save_file(gchar *name, const guint8 *buf, gint len, gchar *savedir);
guint8* easy_readfile(const char *filename, int *file_size);
/* hack to distinguish between different obex protocols */
extern int obex_protocol_type;
#define OBEX_PROTOCOL_GENERIC 0
#define OBEX_PROTOCOL_WIN95_IRXFER 1
/* win95 irxfer ( does not like palm creatorid header ) */
#endif

View file

@ -0,0 +1,255 @@
/*********************************************************************
*
* Filename: obex_common.c
* Version: 0.4
* Description: Utility-functions to act as a PUT server and client
* Status: Experimental.
* Author: Pontus Fuchs <pontus.fuchs@tactel.se>
* Created at: Sat Nov 20 10:54:14 1999
* Modified at: Sun Aug 13 01:54:05 PM CEST 2000
* Modified by: Pontus Fuchs <pontus.fuchs@tactel.se>
* Modified at: Sun Oct 06 10:00:00 2001
* Modified by: Ben Moore <ben@netjunki.org>
*
* Copyright (c) 1999, 2000 Pontus Fuchs, All Rights Reserved.
*
* 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 <stdio.h>
#include <stdlib.h>
#include <openobex/obex.h>
#include "obex_put_common.h"
#include "obex_io.h"
#include "wmcapshare.h"
extern obex_t *handle;
extern volatile int finished;
extern volatile int state;
extern gchar *savedir; /*= "/home/bento/Work/Capture/";*/
volatile int last_rsp = OBEX_RSP_BAD_REQUEST;
/*
* Function put_done()
*
* Parse what we got from a PUT
*
*/
void put_done(obex_object_t *object)
{
obex_headerdata_t hv;
guint8 hi;
gint hlen;
const guint8 *body = NULL;
gint body_len = 0;
gchar *name = NULL;
gchar *namebuf = NULL;
while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen)) {
switch(hi) {
case OBEX_HDR_BODY:
body = hv.bs;
body_len = hlen;
break;
case OBEX_HDR_NAME:
if( (namebuf = g_malloc(hlen / 2))) {
OBEX_UnicodeToChar(namebuf, hv.bs, hlen);
name = namebuf;
}
break;
case OBEX_HDR_LENGTH:
g_print("HEADER_LENGTH = %d\n", hv.bq4);
break;
case HEADER_CREATOR_ID:
g_print("CREATORID = %#x\n", hv.bq4);
break;
default:
g_print(G_GNUC_FUNCTION "() Skipped header %02x\n", hi);
}
}
if(!body) {
g_print("Got a PUT without a body\n");
return;
}
if(!name) {
g_print("Got a PUT without a name. Setting name to %s\n", name);
name = "OBEX_PUT_Unknown_object";
}
safe_save_file(name, body, body_len, savedir);
g_free(namebuf);
}
/*
* Function server_indication()
*
* Called when a request is about to come or has come.
*
*/
void server_request(obex_object_t *object, gint event, gint cmd)
{
switch(cmd) {
case OBEX_CMD_SETPATH:
g_print("Received SETPATH command\n");
OBEX_ObjectSetRsp(object, OBEX_RSP_CONTINUE, OBEX_RSP_SUCCESS);
break;
case OBEX_CMD_PUT:
OBEX_ObjectSetRsp(object, OBEX_RSP_CONTINUE, OBEX_RSP_SUCCESS);
put_done(object);
break;
case OBEX_CMD_CONNECT:
OBEX_ObjectSetRsp(object, OBEX_RSP_SUCCESS, OBEX_RSP_SUCCESS);
break;
case OBEX_CMD_DISCONNECT:
OBEX_ObjectSetRsp(object, OBEX_RSP_SUCCESS, OBEX_RSP_SUCCESS);
break;
default:
g_print(G_GNUC_FUNCTION "() Denied %02x request\n", cmd);
OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_IMPLEMENTED, OBEX_RSP_NOT_IMPLEMENTED);
break;
}
return;
}
/*
* Function client_done_indication()
*
* Called when a server-operation has finished
*
*/
void server_done(obex_object_t *object, gint obex_cmd)
{
/* Quit if DISCONNECT has finished */
if(obex_cmd == OBEX_CMD_DISCONNECT)
finished = 1;
}
/*
* Function client_done()
*
* Called when a client-operation has finished
*
*/
void client_done(obex_object_t *object, gint obex_cmd, gint obex_rsp)
{
last_rsp = obex_rsp;
finished = TRUE;
}
/*
* Function obex_event ()
*
* Called by the obex-layer when some event occurs.
*
*/
void obex_event(obex_t *handle, obex_object_t *object, gint mode, gint event, gint obex_cmd, gint obex_rsp)
{
switch (event) {
case OBEX_EV_PROGRESS:
g_print(".");
updateDisplay();
break;
case OBEX_EV_REQDONE:
g_print("\n");
/* Comes when a command has finished. */
if(mode == OBEX_CLIENT)
client_done(object, obex_cmd, obex_rsp);
else
server_done(object, obex_cmd);
break;
case OBEX_EV_REQHINT:
/* Comes BEFORE the lib parses anything. */
switch(obex_cmd) {
case OBEX_CMD_PUT:
g_print("put\n");
state=CAP_RECIEVE;
updateDisplay();
OBEX_ObjectSetRsp(object, OBEX_RSP_CONTINUE, OBEX_RSP_SUCCESS);
break;
case OBEX_CMD_CONNECT:
g_print("connect\n");
state=CAP_CONNECT;
updateDisplay();
OBEX_ObjectSetRsp(object, OBEX_RSP_CONTINUE, OBEX_RSP_SUCCESS);
break;
case OBEX_CMD_DISCONNECT:
g_print("disconnect\n");
state=CAP_WAIT;
updateDisplay();
OBEX_ObjectSetRsp(object, OBEX_RSP_CONTINUE, OBEX_RSP_SUCCESS);
break;
default:
OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_IMPLEMENTED, OBEX_RSP_NOT_IMPLEMENTED);
break;
}
break;
case OBEX_EV_REQ:
/* Comes when a server-request has been received. */
g_print("server request\n");
server_request(object, event, obex_cmd);
break;
case OBEX_EV_LINKERR:
g_print("Link broken (this does not have to be an error)!\n");
finished = 1;
break;
default:
g_print("Unknown event!\n");
break;
}
}
/*
* Function wait_for_rsp()
*
* Wait for a request to finish!
*
*/
int wait_for_rsp()
{
int ret;
while(!finished) {
ret = OBEX_HandleInput(handle, 1);
if (ret < 0)
return ret;
}
return last_rsp;
}
/*
* Function do_sync_request()
*
* Execute an OBEX-request synchronously.
*
*/
int do_sync_request(obex_t *handle, obex_object_t *object, gint async)
{
gint ret;
OBEX_Request(handle, object);
ret = wait_for_rsp();
finished = FALSE;
return ret;
}

View file

@ -0,0 +1,37 @@
/*********************************************************************
*
* Filename: obex_put_common.h
* Version:
* Description:
* Status: Experimental.
* Author: Pontus Fuchs <pontus.fuchs@tactel.se>
* Created at: Sat Nov 20 10:54:14 1999
* Modified at: Sun Aug 13 09:23:57 PM CEST 2000
* Modified by: Pontus Fuchs <pontus.fuchs@tactel.se>
*
* Copyright (c) 1999, 2000 Pontus Fuchs, All Rights Reserved.
*
* 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 OBEX_PUT_COMMON_H
#define OBEX_PUT_COMMON_H
int do_sync_request(obex_t *handle, obex_object_t *object, gint async);
void obex_event(obex_t *handle, obex_object_t *object, gint mode, gint event, gint obex_cmd, gint obex_rsp);
#endif

1
wmcapshare/version.h Normal file
View file

@ -0,0 +1 @@
#define VERSION "wmCapShare 0.1"

233
wmcapshare/wmcapshare.c Normal file
View file

@ -0,0 +1,233 @@
/*********************************************************************
*
* Filename: wmcapshare.c
* Version: 0.1
* Description: Window Maker Dockapp to Control HP Capshare
* Status: Development
* Author: Ben Moore <ben@netjunki.org>
* Created at: Sun Oct 06 10:00:00 2001
* Modified at: Sun Oct 06 10:00:00 2001
* Modified by: Ben Moore <ben@netjunki.org>
*
* Copyright (c) 2001 Ben Moore, All Rights Reserved.
*
* 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
*
*
*
* Start with --help to see available options
* By default captured pages are put in /tmp
*
********************************************************************/
#include <stdio.h>
#ifndef _WIN32
#include <unistd.h>
#endif
#include <openobex/obex.h>
#include "obex_put_common.h"
#include "obex_io.h"
#include <dockapp.h>
#include "xpm/base.xpm"
#include "xpm/tstatfld.xpm"
#include "xpm/capshare.xpm"
#include "xpm/connected.xpm"
#include "xpm/disconnected.xpm"
#include "xpm/transfering.xpm"
#include "xpm/lcdchars2.xpm"
#include "xpm/lcdnums.xpm"
#include "xpm/plane00.xpm"
#include "xpm/plane01.xpm"
#include "xpm/plane02.xpm"
#include "xpm/plane03.xpm"
#include "xpm/plane04.xpm"
#include "xpm/plane05.xpm"
#include "xpm/plane06.xpm"
#include "xpm/plane07.xpm"
#include "xpm/plane08.xpm"
#include "xpm/plane09.xpm"
#include "xpm/plane10.xpm"
#include "xpm/plane11.xpm"
#include "xpm/plane12.xpm"
#include "xpm/plane13.xpm"
#include "xpm/plane14.xpm"
#include "xpm/plane15.xpm"
#include "xpm/plane16.xpm"
#include "xpm/plane17.xpm"
#include "xpm/plane18.xpm"
#include "xpm/plane19.xpm"
#include "wmcapshare.h"
#include "version.h"
char *displayName = "";
gchar *savedir = "/tmp/";
GC gc;
Pixmap pixmap, mask;
Pixmap tstatfld_buf, tstatfld_mask;
Pixmap blank_buf, blank_mask;
Pixmap capshare_pic, capshare_mask;
Pixmap plane_anim[20], plane_animmask[20];
Pixmap connect_pic, connect_mask;
Pixmap disconnect_pic, disconnect_mask;
Pixmap transfer_pic, transfer_mask;
Pixmap char_buf, char_mask;
Pixmap num_buf, num_mask;
obex_t *handle = NULL;
volatile int finished = FALSE;
volatile int state = 0;
int planeanimpos = 0;
static DAProgramOption options[] = {
{"-d", "--dir", "Directory to save to", DOString, False, {&savedir}}
}
;
int charpos(char c) {
int cn, cai;
cn = c - 97;
cai = cn*6;
return cai;
}
int string2pixmap(char* str, Pixmap *p) {
int x;
XCopyArea(DADisplay, blank_buf, *p, gc, 0,0, 42, 8, 0, 0);
for (x = 0; x < strlen(str); x++) {
XCopyArea(DADisplay, char_buf, *p, gc, charpos(str[x]),0, 6, 8, x*6, 0);
}
}
void updateDisplay() {
switch(state) {
case CAP_WAIT: /* wait */
planeanimpos=0;
XCopyArea(DADisplay, capshare_pic, pixmap, gc, 0, 0, 60, 29, 0, 15);
XCopyArea(DADisplay, disconnect_pic, pixmap, gc, 0, 0, 14, 15, 0, 45);
string2pixmap("waiting", &tstatfld_buf);
XCopyArea(DADisplay, tstatfld_buf, pixmap, gc, 0, 0, 42, 8, 16, 48);
DASetPixmap(pixmap);
break;
case CAP_RECIEVE: /* recieve */
XCopyArea(DADisplay, plane_anim[planeanimpos], pixmap, gc, 0, 0, 60, 29, 0, 15);
planeanimpos++;
if(planeanimpos==20)
planeanimpos = 0;
XCopyArea(DADisplay, connect_pic, pixmap, gc, 0, 0, 14, 15, 0, 45);
string2pixmap("recieve", &tstatfld_buf);
XCopyArea(DADisplay, tstatfld_buf, pixmap, gc, 0, 0, 42, 8, 16, 48);
DASetPixmap(pixmap);
break;
case CAP_CONNECT:
/* connect */
XCopyArea(DADisplay, disconnect_pic, pixmap, gc, 0, 0, 14, 15, 0, 45);
string2pixmap("connect", &tstatfld_buf);
XCopyArea(DADisplay, tstatfld_buf, pixmap, gc, 0, 0, 42, 8, 16, 48);
DASetPixmap(pixmap);
break;
}
}
/*
* Function main (argc, )
*
* Starts all the fun!
*
*/
int main(int argc, char *argv[])
{
obex_object_t *object;
int ret;
unsigned height,width;
int i;
DAParseArguments(argc, argv, options,
sizeof(options)/sizeof(DAProgramOption),
"CapShare Document Management Dock Applet\nBen Moore ben@netjunki.org\n",
VERSION);
DAInitialize(displayName, "wmcapshare", 60,60, argc, argv);
DAMakePixmapFromData(lcdchars2_xpm, &char_buf, &char_mask, &height, &width);
DAMakePixmapFromData(lcdnums_xpm, &num_buf, &num_mask, &height, &width);
DAMakePixmapFromData(base_xpm, &pixmap, &mask, &height, &width);
DAMakePixmapFromData(tstatfld_xpm, &tstatfld_buf, &tstatfld_mask, &height, &width);
DAMakePixmapFromData(tstatfld_xpm, &blank_buf, &blank_mask, &height, &width);
DAMakePixmapFromData(capshare_xpm, &capshare_pic, &capshare_mask, &height, &width);
DAMakePixmapFromData(transfering_xpm, &transfer_pic, &transfer_mask, &height, &width);
DAMakePixmapFromData(connected_xpm, &connect_pic, &connect_mask, &height, &width);
DAMakePixmapFromData(disconnected_xpm, &disconnect_pic, &disconnect_mask, &height, &width);
DAMakePixmapFromData( plane00_xpm, &plane_anim[0], &plane_animmask[1], &height, &width);
DAMakePixmapFromData( plane01_xpm, &plane_anim[1], &plane_animmask[2], &height, &width);
DAMakePixmapFromData( plane02_xpm, &plane_anim[2], &plane_animmask[3], &height, &width);
DAMakePixmapFromData( plane03_xpm, &plane_anim[3], &plane_animmask[4], &height, &width);
DAMakePixmapFromData( plane04_xpm, &plane_anim[4], &plane_animmask[5], &height, &width);
DAMakePixmapFromData( plane05_xpm, &plane_anim[5], &plane_animmask[6], &height, &width);
DAMakePixmapFromData( plane06_xpm, &plane_anim[6], &plane_animmask[6], &height, &width);
DAMakePixmapFromData( plane07_xpm, &plane_anim[7], &plane_animmask[7], &height, &width);
DAMakePixmapFromData( plane08_xpm, &plane_anim[8], &plane_animmask[8], &height, &width);
DAMakePixmapFromData( plane09_xpm, &plane_anim[9], &plane_animmask[9], &height, &width);
DAMakePixmapFromData( plane10_xpm, &plane_anim[10], &plane_animmask[10], &height, &width);
DAMakePixmapFromData( plane11_xpm, &plane_anim[11], &plane_animmask[11], &height, &width);
DAMakePixmapFromData( plane12_xpm, &plane_anim[12], &plane_animmask[12], &height, &width);
DAMakePixmapFromData( plane13_xpm, &plane_anim[13], &plane_animmask[13], &height, &width);
DAMakePixmapFromData( plane14_xpm, &plane_anim[14], &plane_animmask[14], &height, &width);
DAMakePixmapFromData( plane15_xpm, &plane_anim[15], &plane_animmask[15], &height, &width);
DAMakePixmapFromData( plane16_xpm, &plane_anim[16], &plane_animmask[16], &height, &width);
DAMakePixmapFromData( plane17_xpm, &plane_anim[17], &plane_animmask[17], &height, &width);
DAMakePixmapFromData( plane18_xpm, &plane_anim[18], &plane_animmask[18], &height, &width);
DAMakePixmapFromData( plane19_xpm, &plane_anim[19], &plane_animmask[19], &height, &width);
gc = DefaultGC(DADisplay, DefaultScreen(DADisplay));
/*
string2pixmap("recieve", &tstatfld_buf);
XCopyArea(DADisplay, plane_pic, pixmap, gc, 0, 0, 60, 29, 0, 15);
XCopyArea(DADisplay, tstatfld_buf, pixmap, gc, 0, 0, 42, 8, 16, 48);
DASetPixmap(pixmap);
XCopyArea(DADisplay, connect_pic, pixmap, gc, 0, 0, 14, 15, 0, 45);
DASetPixmap(pixmap);
*/
XCopyArea(DADisplay, capshare_pic, pixmap, gc, 0, 0, 60, 29, 0, 15);
DAShow();
while(1) {
handle = OBEX_Init(OBEX_TRANS_IRDA, obex_event, 0);
printf("Waiting for files\n");
OBEX_ServerRegister(handle, "OBEX");
while (!finished) {
updateDisplay();
OBEX_HandleInput(handle, 1);
}
finished = FALSE;
}
return 0;
}

9
wmcapshare/wmcapshare.h Normal file
View file

@ -0,0 +1,9 @@
#ifndef WMCAPSHARE_H
#define WMCAPSHARE_H
#define CAP_WAIT 0
#define CAP_RECIEVE 1
#define CAP_CONNECT 2
void updateDisplay();
#endif

66
wmcapshare/xpm/base.xpm Normal file
View file

@ -0,0 +1,66 @@
/* XPM */
static char * base_xpm[] = {
"60 60 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
"..............+.............................................",
"..............+.............................................",
"..............+.............................................",
"..............+.............................................",
"..............+.............................................",
"..............+.............................................",
"..............+.............................................",
"..............+.............................................",
"..............+.............................................",
"..............+.............................................",
"..............+.............................................",
"..............+.............................................",
"..............+.............................................",
"..............+.............................................",
"..............+............................................."};

13
wmcapshare/xpm/blank.xpm Normal file
View file

@ -0,0 +1,13 @@
/* XPM */
static char * blank_xpm[] = {
"6 8 2 1",
" c None",
". c #8E8E69",
"......",
"......",
"......",
"......",
"......",
"......",
"......",
"......"};

View file

@ -0,0 +1,36 @@
/* XPM */
static char * capshare_xpm[] = {
"60 29 4 1",
" c None",
". c #8E8E69",
"+ c #000000",
"@ c #7F8073",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
".....................++++++++++++++++.......................",
".................++++++++++++++++++++++++...................",
"................++++++++++++++++++++++++++..................",
"................++++++++++++++++++++++++++..................",
"...............++++++++++++++++++++++++++++.................",
"...............++++++@@@@@@@@@@@@@@@@++++++.................",
"...............++++++@@@@@@@@@@@@@@@@++++++.................",
"...............++++++@@@@@@@@@@@@@@@@++++++.................",
"...............++++++@@@@@@@@@@@@@@@@++++++.................",
"...............++++++@@@@@@@@@@@@@@@@++++++.................",
"...............++++++@@@@@@@@@@@@@@@@++++++.................",
"...............++++++@@@@@@@@@@@@@@@@++++++.................",
"...............++++++@@@@@@@@@@@@@@@@++++++.................",
"..............+++++++@@@@@@@@@@@@@@@@++++++.................",
"..............+++++++@@@@@@@@@@@@@@@@+++++++................",
"..............++++++++++++++++++++++++++++++................",
"..............++++++++++++++++++++++++++++++................",
"..............++++++++++++++++++++++++++++++................",
"..............++++++++++++++++++++++++++++++................",
"..............++++++++++++++++++++++++++++++................",
"..............++++++++++++++++++++++++++++++................",
"..............++++++++++++++++++++++++++++++................",
"............................................................",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,21 @@
/* XPM */
static char * connected_xpm[] = {
"14 15 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"..............",
"..............",
"..............",
"..............",
"..............",
".....++++.....",
"....++++++....",
"++++++++++++++",
"....++++++....",
".....++++.....",
"..............",
"..............",
"..............",
"..............",
".............."};

View file

@ -0,0 +1,21 @@
/* XPM */
static char * disconnected_xpm[] = {
"14 15 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"..............",
"..............",
"..............",
"..............",
"..............",
"...++....++...",
"..+++...++++..",
"+++++....+++++",
"..+++...++++..",
"...++....++...",
"..............",
"..............",
"..............",
"..............",
".............."};

View file

@ -0,0 +1,15 @@
/* XPM */
static char * lcdchars_xpm[] = {
"180 8 4 1",
" c None",
". c #8E8E69",
"+ c #616551",
"@ c #000000",
"....................................................................................................................................................................................",
".+@@@+.+@@@..+@@@+.+@@@..+@@@+.+@@@+.+@@@+.+++++..++++..++++.+++++.++++..@+++@.+@@@..+@@@+.+@@@+.+@@@+.+@@@+.+@@@+.@+++..+++++.+++++.+++++.+++++.+++++.+@@@+................@...@.@.",
".@...@.@...@.@...+.@...@.@...+.@...+.@...+.@...@.+...@.+...@.@...@.@...+.@@.@@.@...@.@...@.@...@.@...@.@...@.@...+.@...+.@...@.@...@.@...@.@...@.@...@.+...@................@..@+.@.",
".@...@.@...@.@...+.@...@.@...+.@...+.@...+.@...@.+...@.+...@.@..@+.@...+.@.@.@.@...@.@...@.@...@.@...@.@...@.@...+.@...+.@...@.@...@.@...@.+@.@+.@...@.+..@+..@.............@....@..",
".+@@@+.+@@@..++++..+++++.+@@@..+@@@..++@@+.+@@@+..++++..++++.+@@+..++++..+++++.+++++.+++++.+@@@+.+@+++.+@@@..+@@@+..@@@..+++++.+++++.+++++..+@+..+@@@+..+@+...+............@.....@..",
".@...@.@...@.@...+.@...@.@...+.@...+.@...@.@...@.+...@.+...@.@..@+.@...+.@...@.@...@.@...@.@...+.@.@.@.@...@.+...@.@...+.@...@.@...@.@.@.@.+@.@+.+...@.+@..+...............@.....@..",
".@...@.@...@.@...+.@...@.@...+.@...+.@...@.@...@.+...@.+...@.@...@.@...+.@...@.@...@.@...@.@...+.@..@@.@...@.+...@.@...+.@...@.@...@.@@.@@.@...@.+...@.@...+..@.......+...@.....@.+@",
".+++++.+@@@..+@@@+.@@@@..+@@@+.@+++..+@@@+.+++++..+++@.+@@@+.+++++.+@@@+.+++++.@+++@.+@@@+.++++..+@@@+.+++++.+@@@+..@@@..+@@@@..@@@..@+++@.++++@++@@@+.+@@@+..+.......@...@.....@.@."};

View file

@ -0,0 +1,15 @@
/* XPM */
static char * lcdchars2_xpm[] = {
"180 8 4 1",
" c None",
". c #8E8E69",
"+ c #000000",
"@ c #616551",
"....................................................................................................................................................................................",
"..+++..++++...+++..++++..++++..++++..++++..+...+.+++++.....+.+...+.+.....+...+..+++...+++...+++...+++...+++...+++..+++++.+...+.+...+.+...+.+...+.+...+.+++++................+...+.+.",
".+...+.+...+.+.....+...+.+.....+.....+.....+...+...+.......+.+..+..+.....++.++.+...+.+...+.+...+.+...+.+...+.+.......+...+...+.+...+.+...+.+...+.+...+.+...+................+..+@.+.",
".+...+.+...+.+.....+...+.+.....+.....+.....+...+...+.......+.+.+...+.....+.+.+.+...+.+...+.+...+.+...+.+...+.+.......+...+...+.+...+.+...+..+.+..+...+....+...+.............+....+..",
".+++++.++++..+.....+...+.++++..++++..+.++..+++++...+.......+.+++...+.....+...+.+...+.+...+.++++..++..+.++++...+++....+...+...+..+.+..+...+...+....+++....+....@............+.....+..",
".+...+.+...+.+.....+...+.+.....+.....+...+.+...+...+.......+.+.+...+.....+...+.+...+.+...+.+.....+.+.+.+...+.....+...+...+...+..+.+..+.+.+..+.+....+....+..................+.....+..",
".+...+.+...+.+.....+...+.+.....+.....+...+.+...+...+.......+.+..+..+.....+...+.+...+.+...+.+.....+..++.+...+.....+...+...+...+..+.+..++.++.+...+...+...+...+..+.......@...+.....+.@+",
".+...+.++++...+++..++++..++++..+.....++++..+...+.+++++.++++..+...+.+++++.+...+.+...+..+++..+......+++..+...+..+++....+...+++++...+...+...+.+...+...+...+++++..@.......+...+.....+.+."};

View file

@ -0,0 +1,15 @@
/* XPM */
static char * lcdnums_xpm[] = {
"60 8 4 1",
" c None",
". c #8E8E69",
"+ c #000000",
"@ c #616551",
"............................................................",
"..+++...@@@@.@+++@.@+++@.@@@@@.@+++@.@+++@.@+++@.@+++@.@+++@",
".+...+.@...+.@...+.@...+.+...+.+...@.+...@.@...+.+...+.+...+",
".+...+.@...+.@...+.@...+.+...+.+...@.+...@.@...+.+...+.+...+",
".@@@@@..@@@@.@+++@..+++@.@+++@.@+++@.@+++@..@@@@.@+++@.@+++@",
".+...+.@...+.+...@.@...+.@...+.@...+.+...+.@...+.+...+.@...+",
".+...+.@...+.+...@.@...+.@...+.@...+.+...+.@...+.+...+.@...+",
"..+++...@@@+.@+++@.@+++@..@@@@.@+++@.@+++@..@@@@.@+++@.@+++@"};

BIN
wmcapshare/xpm/plane.xcf Normal file

Binary file not shown.

View file

@ -0,0 +1,34 @@
/* XPM */
static char * plane00_xpm[] = {
"60 29 2 1",
" c None",
". c #8E8E69",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane01_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"+...........................................................",
".++.........................................................",
"...++.......................................................",
"++++++......................................................",
"...++.......................................................",
".++.........................................................",
"+...........................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane02_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"..+.+++.....................................................",
"...+...++...................................................",
"....+....++.................................................",
".....+++++++................................................",
"....+....++.................................................",
"...+...++...................................................",
"..+.+++.....................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane03_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
".......+.+++................................................",
"........+...++..............................................",
".........+....++............................................",
"..........+++++++...........................................",
".........+....++............................................",
"........+...++..............................................",
".......+.+++................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane04_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............+.+++...........................................",
".............+...++.........................................",
"..............+....++.......................................",
"...............+++++++......................................",
"..............+....++.......................................",
".............+...++.........................................",
"............+.+++...........................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane05_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
".................+.+++......................................",
"..................+...++....................................",
"...................+....++..................................",
"....................+++++++.................................",
"...................+....++..................................",
"..................+...++....................................",
".................+.+++......................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane06_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
".....................+.+++..................................",
"......................+...++................................",
".......................+....++..............................",
"........................+++++++.............................",
".......................+....++..............................",
"......................+...++................................",
".....................+.+++..................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane07_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"..........................+.+++.............................",
"...........................+...++...........................",
"............................+....++.........................",
".............................+++++++........................",
"............................+....++.........................",
"...........................+...++...........................",
"..........................+.+++.............................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane08_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................+.+++...........................",
".............................+...++.........................",
"..............................+....++.......................",
"...............................+++++++......................",
"..............................+....++.......................",
".............................+...++.........................",
"............................+.+++...........................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane09_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"...............................+.+++........................",
"................................+...++......................",
".................................+....++....................",
"..................................+++++++...................",
".................................+....++....................",
"................................+...++......................",
"...............................+.+++........................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane10_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"..................................+.+++.....................",
"...................................+...++...................",
"....................................+....++.................",
".....................................+++++++................",
"....................................+....++.................",
"...................................+...++...................",
"..................................+.+++.....................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane11_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
".....................................+.+++..................",
"......................................+...++................",
".......................................+....++..............",
"........................................+++++++.............",
".......................................+....++..............",
"......................................+...++................",
".....................................+.+++..................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane12_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
".......................................+.+++................",
"........................................+...++..............",
".........................................+....++............",
"..........................................+++++++...........",
".........................................+....++............",
"........................................+...++..............",
".......................................+.+++................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane13_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
".........................................+.+++..............",
"..........................................+...++............",
"...........................................+....++..........",
"............................................+++++++.........",
"...........................................+....++..........",
"..........................................+...++............",
".........................................+.+++..............",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane14_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"...........................................+.+++............",
"............................................+...++..........",
".............................................+....++........",
"..............................................+++++++.......",
".............................................+....++........",
"............................................+...++..........",
"...........................................+.+++............",
"............................................................",
"............................................................",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane15_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
".............................................+.+++..........",
"..............................................+...++........",
"...............................................+....++......",
"................................................+++++++.....",
"...............................................+....++......",
"..............................................+...++........",
".............................................+.+++..........",
"............................................................",
"............................................................"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane16_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"...............................................+.+++........",
"................................................+...++......",
".................................................+....++....",
"..................................................+++++++...",
".................................................+....++....",
"................................................+...++......",
"...............................................+.+++........"};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane17_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"..................................................+.+++.....",
"...................................................+...++...",
"....................................................+....++.",
".....................................................+++++++",
"....................................................+....++.",
"...................................................+...++...",
"..................................................+.+++....."};

View file

@ -0,0 +1,35 @@
/* XPM */
static char * plane18_xpm[] = {
"60 29 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"......................................................+.+++.",
".......................................................+...+",
"........................................................+...",
".........................................................+++",
"........................................................+...",
".......................................................+...+",
"......................................................+.+++."};

View file

@ -0,0 +1,34 @@
/* XPM */
static char * plane19_xpm[] = {
"60 29 2 1",
" c None",
". c #8E8E69",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................",
"............................................................"};

BIN
wmcapshare/xpm/test.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View file

@ -0,0 +1,21 @@
/* XPM */
static char * transfering_xpm[] = {
"14 15 3 1",
" c None",
". c #8E8E69",
"+ c #000000",
"..............",
"..............",
"..............",
"...+......+...",
"..+++.....+...",
".+.+.+....+...",
"...+......+...",
"...+......+...",
"...+......+...",
"...+....+.+.+.",
"...+.....+++..",
"...+......+...",
"..............",
"..............",
".............."};

View file

@ -0,0 +1,13 @@
/* XPM */
static char * tstatfield_xpm[] = {
"42 8 2 1",
" c None",
". c #8E8E69",
"..........................................",
"..........................................",
"..........................................",
"..........................................",
"..........................................",
"..........................................",
"..........................................",
".........................................."};

View file

@ -0,0 +1,13 @@
/* XPM */
static char * tstatfld_xpm[] = {
"42 8 2 1",
" c None",
". c #8E8E69",
"..........................................",
"..........................................",
"..........................................",
"..........................................",
"..........................................",
"..........................................",
"..........................................",
".........................................."};