2001-05-23 15:26:42 +02:00
|
|
|
/*
|
|
|
|
* PROGRAM: JRD Access Method
|
|
|
|
* MODULE: isc_f_proto.h
|
2003-10-29 11:53:47 +01:00
|
|
|
* DESCRIPTION: Prototype header file for isc_file.cpp
|
2001-05-23 15:26:42 +02:00
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Interbase Public
|
|
|
|
* License Version 1.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy
|
|
|
|
* of the License at http://www.Inprise.com/IPL.html
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an
|
|
|
|
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
|
|
|
|
* or implied. See the License for the specific language governing
|
|
|
|
* rights and limitations under the License.
|
|
|
|
*
|
|
|
|
* The Original Code was created by Inprise Corporation
|
|
|
|
* and its predecessors. Portions created by Inprise Corporation are
|
|
|
|
* Copyright (C) Inprise Corporation.
|
|
|
|
*
|
|
|
|
* All Rights Reserved.
|
|
|
|
* Contributor(s): ______________________________________.
|
2002-10-30 06:04:56 +01:00
|
|
|
*
|
|
|
|
* 2002.10.29 Sean Leyne - Removed support for obsolete IPX/SPX Protocol
|
|
|
|
*
|
2001-05-23 15:26:42 +02:00
|
|
|
*/
|
|
|
|
|
2003-10-03 03:53:34 +02:00
|
|
|
#ifndef JRD_ISC_FILE_PROTO_H
|
|
|
|
#define JRD_ISC_FILE_PROTO_H
|
2001-05-23 15:26:42 +02:00
|
|
|
|
2004-12-17 06:41:47 +01:00
|
|
|
#include "../common/classes/fb_string.h"
|
2004-03-14 14:36:37 +01:00
|
|
|
|
2008-12-22 10:00:05 +01:00
|
|
|
enum iscProtocol {ISC_PROTOCOL_LOCAL, ISC_PROTOCOL_TCPIP, ISC_PROTOCOL_WLAN};
|
|
|
|
|
2003-11-07 09:06:35 +01:00
|
|
|
#ifndef NO_NFS
|
2004-11-07 15:43:29 +01:00
|
|
|
bool ISC_analyze_nfs(Firebird::PathName&, Firebird::PathName&);
|
2003-11-07 09:06:35 +01:00
|
|
|
#endif
|
2004-11-07 15:43:29 +01:00
|
|
|
bool ISC_analyze_pclan(Firebird::PathName&, Firebird::PathName&);
|
|
|
|
bool ISC_analyze_tcp(Firebird::PathName&, Firebird::PathName&);
|
|
|
|
bool ISC_analyze_xnet(Firebird::PathName&, Firebird::PathName&);
|
2004-03-14 14:36:37 +01:00
|
|
|
bool ISC_check_if_remote(const Firebird::PathName&, bool);
|
2005-09-30 18:16:39 +02:00
|
|
|
iscProtocol ISC_extract_host(Firebird::PathName&, Firebird::PathName&, bool);
|
2006-04-23 10:31:52 +02:00
|
|
|
bool ISC_expand_filename(Firebird::PathName&, bool);
|
2009-04-05 00:38:56 +02:00
|
|
|
void ISC_systemToUtf8(Firebird::AbstractString& str);
|
|
|
|
void ISC_utf8ToSystem(Firebird::AbstractString& str);
|
2009-07-06 17:29:14 +02:00
|
|
|
void ISC_escape(Firebird::AbstractString& str);
|
|
|
|
void ISC_unescape(Firebird::AbstractString& str);
|
2004-11-07 15:43:29 +01:00
|
|
|
|
|
|
|
// This form of ISC_expand_filename makes epp files happy
|
2008-12-20 09:12:19 +01:00
|
|
|
inline bool ISC_expand_filename(const TEXT* unexpanded, USHORT len_unexpanded,
|
|
|
|
TEXT* expanded, size_t len_expanded,
|
2008-12-05 01:56:15 +01:00
|
|
|
bool expand_share)
|
2004-10-08 06:48:02 +02:00
|
|
|
{
|
2008-12-20 09:12:19 +01:00
|
|
|
Firebird::PathName pn(unexpanded, len_unexpanded ? len_unexpanded : strlen(unexpanded));
|
2004-11-07 15:43:29 +01:00
|
|
|
ISC_expand_filename(pn, expand_share);
|
2006-04-23 10:31:52 +02:00
|
|
|
// What do I return here if the previous call returns false?
|
2006-10-29 15:16:29 +01:00
|
|
|
return (pn.copyTo(expanded, len_expanded) != 0);
|
2004-03-14 14:36:37 +01:00
|
|
|
}
|
2004-11-07 15:43:29 +01:00
|
|
|
|
|
|
|
void ISC_expand_share(Firebird::PathName&);
|
2003-10-03 03:53:34 +02:00
|
|
|
int ISC_file_lock(SSHORT);
|
|
|
|
int ISC_file_unlock(SSHORT);
|
2001-05-23 15:26:42 +02:00
|
|
|
|
2003-10-03 03:53:34 +02:00
|
|
|
#endif // JRD_ISC_FILE_PROTO_H
|