~ubuntu-branches/ubuntu/natty/ibm-3270/natty

« back to all changes in this revision

Viewing changes to wc3270/relinkc.h

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2009-12-14 11:48:53 UTC
  • mfrom: (1.1.4 upstream) (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091214114853-mywixml32hct9jr1
Tags: 3.3.10ga4-2
* Fix section to match override.
* Use debhelper compat level 7.
* Use 3.0 (quilt) source format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2006-2009, Paul Mattes.
 
3
 * All rights reserved.
 
4
 * 
 
5
 * Redistribution and use in source and binary forms, with or without
 
6
 * modification, are permitted provided that the following conditions
 
7
 * are met:
 
8
 *     * Redistributions of source code must retain the above copyright
 
9
 *       notice, this list of conditions and the following disclaimer.
 
10
 *     * Redistributions in binary form must reproduce the above copyright
 
11
 *       notice, this list of conditions and the following disclaimer in the
 
12
 *       documentation and/or other materials provided with the distribution.
 
13
 *     * Neither the name of Paul Mattes nor his contributors may be used
 
14
 *       to endorse or promote products derived from this software without
 
15
 *       specific prior written permission.
 
16
 * 
 
17
 * THIS SOFTWARE IS PROVIDED BY PAUL MATTES "AS IS" AND ANY EXPRESS
 
18
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
19
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 
20
 * DISCLAIMED. IN NO EVENT SHALL PAUL MATTES BE LIABLE FOR ANY DIRECT,
 
21
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 
22
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 
23
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 
24
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 
25
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 
26
 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 
27
 * POSSIBILITY OF SUCH DAMAGE.
 
28
 */
 
29
 
 
30
/*
 
31
 *      relinkc.h
 
32
 *              A Windows console-based 3270 Terminal Emulator
 
33
 *              Utility functions to read a session file and create a
 
34
 *              compatible shortcut.
 
35
 */
 
36
 
 
37
#define STR_SIZE        256
 
38
 
 
39
#define WIZARD_VER      2
 
40
 
 
41
typedef struct {
 
42
        /* Fields for wc3270 3.3.9 (Wizard version 1) */
 
43
        char  session[STR_SIZE];        /* session name */
 
44
        char  host[STR_SIZE];           /* host name */
 
45
        DWORD port;                     /* TCP port */
 
46
        char  luname[STR_SIZE];         /* LU name */
 
47
        DWORD ssl;                      /* SSL tunnel flag */
 
48
        char  proxy_type[STR_SIZE];     /* proxy type */
 
49
        char  proxy_host[STR_SIZE];     /*  proxy host */
 
50
        char  proxy_port[STR_SIZE];     /*  proxy port */
 
51
        DWORD model;                    /* model number */
 
52
        char  charset[STR_SIZE];        /* character set name */
 
53
        DWORD is_dbcs;
 
54
        DWORD wpr3287;                  /* wpr3287 flag */
 
55
        char  printerlu[STR_SIZE];      /*  printer LU */
 
56
        char  printer[STR_SIZE];        /*  Windows printer name */
 
57
        char  printercp[STR_SIZE];      /*  wpr3287 code page */
 
58
        char  keymaps[STR_SIZE];        /* keymap names */
 
59
 
 
60
        /* Field added for wc3270 3.3.10 (Wizard version 2) */
 
61
        unsigned char flags;            /* miscellaneous flags */
 
62
        unsigned char ov_rows;          /* oversize rows */
 
63
        unsigned char ov_cols;          /* oversize columns */
 
64
        unsigned char point_size;       /* font point size */
 
65
} session_t;
 
66
 
 
67
#define WF_EMBED_KEYMAPS        0x01    /* embed keymaps in session */
 
68
#define WF_AUTO_SHORTCUT        0x02    /* 'auto-shortcut' mode */
 
69
#define WF_WHITE_BG             0x04    /* white background */
 
70
 
 
71
typedef struct {
 
72
        char *name;
 
73
        char *hostcp;
 
74
        int is_dbcs;
 
75
        wchar_t *codepage;
 
76
} charsets_t;
 
77
extern charsets_t charsets[];
 
78
extern size_t num_charsets;
 
79
extern char *user_settings;
 
80
 
 
81
extern int read_session(FILE *f, session_t *s);
 
82
extern HRESULT create_shortcut(session_t *session, char *exepath,
 
83
        char *linkpath, char *args, char *workingdir);