Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /trunk/teraterm/teraterm/ttplug.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6806 - (hide annotations) (download) (as text)
Thu Jun 15 00:37:01 2017 UTC (6 years, 9 months ago) by doda
File MIME type: text/x-chdr
File size: 7247 byte(s)
TeraTerm Project としてのライセンス表記を追加

とりあえず Tera Term 本体分。
TeraTerm Project としての copyright 表記の年部分はコミットログを確認して書いたつもりだけど、ミスってたらすみません。

TODO: 過去に取り込んだパッチに関する著作権表記の追加
1 doda 6806 /*
2     * Copyright (C) 1994-1998 T. Teranishi
3     * (C) Robert O'Callahan
4     * (C) 2008-2017 TeraTerm Project
5     * All rights reserved.
6     *
7     * Redistribution and use in source and binary forms, with or without modification,
8     * are permitted provided that the following conditions are met:
9     *
10     * 1. Redistributions of source code must retain the above copyright notice,
11     * this list of conditions and the following disclaimer.
12     * 2. Redistributions in binary form must reproduce the above copyright notice,
13     * this list of conditions and the following disclaimer in the documentation
14     * and/or other materials provided with the distribution.
15     * 3. The name of the author may not be used to endorse or promote products derived
16     * from this software without specific prior written permission.
17     *
18     * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
19     * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20     * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
21     * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22     * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
23     * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25     * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
26     * OF SUCH DAMAGE.
27     */
28 maya 3227 #ifndef __TTPLUG_H
29     #define __TTPLUG_H
30    
31     #ifdef __cplusplus
32     extern "C" {
33     #endif
34    
35     #include "ttplugin.h"
36    
37     /* This function initializes the extensions and is called at the beginning
38     of the program. */
39 doda 6801 void PASCAL TTXInit(PTTSet ts, PComVar cv);
40 maya 3227
41     /* This function is called when a TCP connection is about to be opened.
42     This macro stuff is to make sure that the functions in the caller's
43     EXE or DLL are hooked. */
44 doda 6801 void PASCAL TTXInternalOpenTCP(TTXSockHooks * hooks);
45 maya 3227 #define TTXOpenTCP() \
46     do { \
47     static TTXSockHooks SockHooks = { \
48     &Pclosesocket, &Pconnect, &Phtonl, &Phtons, &Pinet_addr, \
49     &Pioctlsocket, &Precv, &Pselect, &Psend, &Psetsockopt, \
50     &Psocket, &PWSAAsyncSelect, &PWSAAsyncGetHostByName, \
51 doda 4089 &PWSACancelAsyncRequest, &PWSAGetLastError, \
52 doda 4165 /* &Pgetaddrinfo,*/ &Pfreeaddrinfo, &PWSAAsyncGetAddrInfo \
53 maya 3227 }; \
54     TTXInternalOpenTCP(&SockHooks); \
55     } while (0)
56    
57     /* This function is called when a TCP connection has been closed.
58     This macro stuff is to make sure that the functions in the caller's
59     EXE or DLL are hooked. */
60 doda 6801 void PASCAL TTXInternalCloseTCP(TTXSockHooks * hooks);
61 maya 3227 #define TTXCloseTCP() \
62     do { \
63     static TTXSockHooks SockHooks = { \
64     &Pclosesocket, &Pconnect, &Phtonl, &Phtons, &Pinet_addr, \
65     &Pioctlsocket, &Precv, &Pselect, &Psend, &Psetsockopt, \
66     &Psocket, &PWSAAsyncSelect, &PWSAAsyncGetHostByName, \
67 doda 4089 &PWSACancelAsyncRequest, &PWSAGetLastError, \
68 doda 4165 /* &Pgetaddrinfo,*/ &Pfreeaddrinfo, &PWSAAsyncGetAddrInfo \
69 maya 3227 }; \
70     TTXInternalCloseTCP(&SockHooks); \
71     } while (0)
72    
73 doda 6801 void PASCAL TTXInternalOpenFile(TTXFileHooks * hooks);
74 maya 3227 #define TTXOpenFile() \
75     do { \
76     static TTXFileHooks FileHooks = { \
77     &PCreateFile, &PCloseFile, &PReadFile, &PWriteFile \
78     }; \
79     TTXInternalOpenFile(&FileHooks); \
80     } while (0)
81    
82 doda 6801 void PASCAL TTXInternalCloseFile(TTXFileHooks * hooks);
83 maya 3227 #define TTXCloseFile() \
84     do { \
85     static TTXFileHooks FileHooks = { \
86     &PCreateFile, &PCloseFile, &PReadFile, &PWriteFile \
87     }; \
88     TTXInternalCloseFile(&FileHooks); \
89     } while (0)
90    
91     /* This function is called after the TTDLG DLL has been loaded.
92     This macro stuff is to make sure that the functions in the caller's
93     EXE or DLL are hooked. */
94 doda 6801 void PASCAL TTXInternalGetUIHooks(TTXUIHooks * hooks);
95 maya 3227 #define TTXGetUIHooks() \
96     do { \
97     static TTXUIHooks UIHooks = { \
98     &SetupTerminal, &SetupWin, &SetupKeyboard, &SetupSerialPort, \
99     &SetupTCPIP, &GetHostName, &ChangeDirectory, &AboutDialog, \
100     &ChooseFontDlg, &SetupGeneral, &WindowWindow \
101     }; \
102     TTXInternalGetUIHooks(&UIHooks); \
103     } while (0)
104    
105     /* This function is called after the TTSET DLL has been loaded.
106     This macro stuff is to make sure that the functions in the caller's
107     EXE or DLL are hooked. */
108 doda 6801 void PASCAL TTXInternalGetSetupHooks(TTXSetupHooks * hooks);
109 maya 3227 #define TTXGetSetupHooks() \
110     do { \
111     static TTXSetupHooks SetupHooks = { \
112     &ReadIniFile, &WriteIniFile, &ReadKeyboardCnf, &CopyHostList, \
113     &AddHostToList, &ParseParam \
114     }; \
115     TTXInternalGetSetupHooks(&SetupHooks); \
116     } while (0)
117    
118     /* This function is called when the window size has changed. */
119 doda 6801 void PASCAL TTXSetWinSize(int rows, int cols);
120 maya 3227
121     /* This function adds the extensions' entries to the menu, which is the
122     handle for the program's menubar. */
123 doda 6801 void PASCAL TTXModifyMenu(HMENU menu);
124 maya 3227
125     /* This function is called when a popup menu is about to be displayed.
126     The status of the entries is set appropriately. */
127 doda 6801 void PASCAL TTXModifyPopupMenu(HMENU menu);
128 maya 3227
129     /* This function calls on the extensions to handle a command. It returns
130     TRUE if they handle it, otherwise FALSE. */
131 doda 6801 BOOL PASCAL TTXProcessCommand(HWND hWin, WORD cmd);
132 maya 3227
133     /* This function is called to see whether Telnet mode can be turned on when
134     Tera Term thinks it has detected a telnetd */
135 doda 6801 void PASCAL TTXEnd(void);
136 maya 3227
137     /* This function is called when a new Tera Term is being started with certain
138     settings and the extension may wish to add some options to the command line */
139 doda 6801 void PASCAL TTXSetCommandLine(PCHAR cmd, int cmdlen, PGetHNRec rec);
140 maya 3227 #ifdef __cplusplus
141     }
142     #endif
143    
144     #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26