~ubuntu-branches/ubuntu/karmic/gnustep-base/karmic

« back to all changes in this revision

Viewing changes to Headers/gnustep/base/WindowsFileHandle.h

  • Committer: Bazaar Package Importer
  • Author(s): Eric Heintzmann
  • Date: 2005-04-17 00:14:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050417001438-enf0y07c9tku85z1
Tags: 1.10.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Interface for WindowsFileHandle for GNUStep
2
 
   Copyright (C) 1997 Free Software Foundation, Inc.
3
 
 
4
 
   Written by:  Richard Frith-Macdonald <richard@brainstorm.co.uk>
5
 
   Date: 1997
6
 
 
7
 
   This file is part of the GNUstep Base Library.
8
 
 
9
 
   This library is free software; you can redistribute it and/or
10
 
   modify it under the terms of the GNU Library General Public
11
 
   License as published by the Free Software Foundation; either
12
 
   version 2 of the License, or (at your option) any later version.
13
 
 
14
 
   This library is distributed in the hope that it will be useful,
15
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17
 
   Library General Public License for more details.
18
 
 
19
 
   You should have received a copy of the GNU Library General Public
20
 
   License along with this library; if not, write to the Free
21
 
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
22
 
   */
23
 
 
24
 
#ifndef __WindowsFileHandle_h_GNUSTEP_BASE_INCLUDE
25
 
#define __WindowsFileHandle_h_GNUSTEP_BASE_INCLUDE
26
 
 
27
 
#include <Foundation/NSFileHandle.h>
28
 
#include <Foundation/NSArray.h>
29
 
#include <Foundation/NSDictionary.h>
30
 
#include <Foundation/NSRunLoop.h>
31
 
 
32
 
#ifdef HAVE_WINDOWS_H
33
 
#include <windows.h>
34
 
#endif
35
 
 
36
 
@interface WindowsFileHandle : NSFileHandle <RunLoopEvents>
37
 
{
38
 
    HANDLE                      handle;
39
 
    int                         descriptor;
40
 
    BOOL                        closeOnDealloc;
41
 
    BOOL                        isStandardFile;
42
 
    BOOL                        isNullDevice;
43
 
    BOOL                        isNonBlocking;
44
 
    BOOL                        wasNonBlocking;
45
 
    BOOL                        acceptOK;
46
 
    BOOL                        connectOK;
47
 
    BOOL                        readOK;
48
 
    BOOL                        writeOK;
49
 
    NSMutableDictionary         *readInfo;
50
 
    int                         readPos;
51
 
    NSMutableArray              *writeInfo;
52
 
    int                         writePos;
53
 
    NSString                    *address;
54
 
    NSString                    *service;
55
 
    NSString                    *protocol;
56
 
}
57
 
 
58
 
- (id)initAsClientAtAddress:address
59
 
                    service:service
60
 
                   protocol:protocol;
61
 
- (id)initAsClientInBackgroundAtAddress:address
62
 
                                service:service
63
 
                               protocol:protocol
64
 
                               forModes:modes;
65
 
- (id)initAsServerAtAddress:address
66
 
                    service:service
67
 
                   protocol:protocol;
68
 
- (id)initForReadingAtPath:(NSString*)path;
69
 
- (id)initForWritingAtPath:(NSString*)path;
70
 
- (id)initForUpdatingAtPath:(NSString*)path;
71
 
- (id)initWithStandardError;
72
 
- (id)initWithStandardInput;
73
 
- (id)initWithStandardOutput;
74
 
- (id)initWithNullDevice;
75
 
 
76
 
- (void)checkAccept;
77
 
- (void)checkConnect;
78
 
- (void)checkRead;
79
 
- (void)checkWrite;
80
 
 
81
 
- (void)ignoreReadDescriptor;
82
 
- (void)ignoreWriteDescriptor;
83
 
- (void)setNonBlocking:(BOOL)flag;
84
 
- (void)postReadNotification;
85
 
- (void)postWriteNotification;
86
 
- (void)receivedEvent: (void*)data
87
 
                 type: (RunLoopEventType)type
88
 
                extra: (void*)extra
89
 
              forMode: (NSString*)mode;
90
 
- (NSDate*)timedOutEvent: (void*)data
91
 
                    type: (RunLoopEventType)type
92
 
                 forMode: (NSString*)mode;
93
 
- (void)watchReadDescriptorForModes:(NSArray*)modes;
94
 
- (void)watchWriteDescriptor;
95
 
 
96
 
@end
97
 
 
98
 
#endif /* __WindowsFileHandle_h_GNUSTEP_BASE_INCLUDE */