/*****************************************************************************
FILE:               Oracle7Context-ForFriends.h
LANGUAGE:           Objective-C
SYSTEM:             GNUstep
USER-INTERFACE:     None
DESCRIPTION

    This category defines a private API of Oracle7Context 
    used by Oracle7Adaptor and Oracle7Channel.

    Its implementation is based on the OCI v8, and should be compatible
    with, both Oracle7, Oracle8 and future Oracle9 databases.

AUTHORS
    <PJB> Pascal J. Bourguignon <pjb@imaginet.fr>
MODIFICATIONS
    1999/07/25 Creation.
BUGS
    - ...
LEGAL
    Written by:  Pascal J. Bourguignon <pjb@imaginet.fr>
    Funds from:  Orange Concept (http://www.orange-concept.com/)
    Date:        August 1999 - February 2000

    This file is part of the Oracle7 Adaptor, GNUstep Database Library.
    The Oracle7 Adaptor allows access to Oracle[678] databases from GDL.

    Copyright (C) 2000 Free Software Foundation, Inc.

    This  library is  free software;  you can  redistribute  it and/or
    modify it under the terms of the GNU Lesser General Public License
    as published by the Free  Software Foundation; either version 2 of
    the License, or (at your option) any later version.

    This library  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
    Lesser General Public License for more details.

    You should have  received a copy of the  GNU Lesser General Public
    License  along  with this  library;  if  not,  write to  the  Free
    Software  Foundation, Inc.,  59 Temple  Place, Suite  330, Boston,
    MA 02111-1307 USA
*****************************************************************************/
#ifndef __Oracle7Context_ForFriends_h__
#define __Oracle7Context_ForFriends_h__

@class O2CI7ServiceContext; // is a private class.

@interface Oracle7Context(ForFriends)
    
    -(NSString*)connectionString;
        /*
            RETURN:     a connection string built from the connection dictionary
                        of the adaptor. Either SQL*Net v1 or v2 depending on
                        the presence of the host name in the connection 
                        dictionary.
        */



    /*
        Actually, the current implementation has one serviceContext 
        per Oracle7Context. This service context is shared amongst the
        Oracle7Channel instances of the same Oracle7Context.
        That's because the serviceContext manages the transaction.
    */

    -(O2CI7Context*)createContext;
        /*
            DO:         what it needs to do to connect to the database and
                        begin a session with the connectionDictionary of
                        the adaptor. If all went well, return its 
                        O2CI7Context instance that can be used by the
                        channel to access the database.

            RETURN:     an newly connected O2CI7Context instance if
                        successfull, nil otherwise.

            NOTE:       if the channel cannot complete successfully it's opening,
                        it should send the context an disposeContext:.

            NOTE:       if an error occur, it is reported automatically.
        */


    -(void)disposeContext:(O2CI7Context*)aContext;
        /*
            NOTE:       the channel inform the context that it has finished
                        with this service context.

            DO:         end the session and dispose of the service context.
        */


@end // Oracle7Context(ForFriends);


#endif /* __Oracle7Context_ForFriends_h__ */
/*** Oracle7Context-ForFriends.h      -- 2000-02-21 07:11:23 -- PJB ***/
