/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
/*
 *  MateComponent_ActivationContext.idl:
 *
 *  Copyright (C) 1999, 2000 Red Hat, Inc.
 *  Copyright (C) 1999, 2000 Eazel, Inc.
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU 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
 *  General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this library; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *  Authors: Elliot Lee <sopwith@redhat.com>,
 *           Maciej Stachowiak <mjs@noisehavoc.org>
 *
 */

#ifndef __MATECOMPONENT_ACTIVATION_CONTEXT_IDL__
#define __MATECOMPONENT_ACTIVATION_CONTEXT_IDL__

#ifndef __MateComponent_ActivationContext_COMPILATION
#ifdef  __MATECORBA_IDL__
%{
#pragma include_defs matecomponent-activation/MateComponent_ActivationContext.h
%}
#pragma inhibit push
#endif
#endif

#include <MateComponent_Unknown.idl>
#include <MateComponent_Activation_types.idl>

/* ObjectDirectory needs a forward declaration of ActivationContext */
module MateComponent {
        interface ActivationContext;
        interface ActivationClient;
};

#include <MateComponent_ObjectDirectory.idl>

module MateComponent {
        interface ActivationClient : MateComponent::Unknown {
                oneway void resetCache ();
                long getVersion ();
        };

        typedef sequence<ObjectDirectory> ObjectDirectoryList;

        interface ActivationContext : MateComponent::Unknown {
                readonly attribute ObjectDirectoryList directories;
                readonly attribute ServerInfoList      servers;

                oneway void addClient (in ActivationClient client,
                                       in string           locales);

                void addDirectory    (in ObjectDirectory dir) raises (MateComponent::Activation::AlreadyListed);
                void removeDirectory (in ObjectDirectory dir) raises (MateComponent::Activation::NotListed);

                ServerInfoList query (in string             requirements,
                                      in MateComponent::StringList selection_order)
                        raises (MateComponent::Activation::ParseFailed,
                                MateComponent::Activation::IncompleteContext)
                        context ("username", "hostname");

                ActivationResult activateMatching (in string                        requirements,
                                                   in MateComponent::StringList            selection_order,
                                                   in MateComponent::ActivationEnvironment environment,
                                                   in ActivationFlags               flags)
                        raises (MateComponent::Activation::ParseFailed,
                                MateComponent::Activation::IncompleteContext,
                                MateComponent::GeneralError)
                        context ("username", "hostname");
                ActivationResult activateMatchingFull (in string                        requirements,
                                                       in MateComponent::StringList            selection_order,
                                                       in MateComponent::ActivationEnvironment environment,
                                                       in ActivationFlags               flags,
                                                       in ActivationClient              client)
                        raises (MateComponent::Activation::ParseFailed,
                                MateComponent::Activation::IncompleteContext,
                                MateComponent::GeneralError)
                        context ("username", "hostname");

                ActivationResult activateFromAid (in ActivationID    aid,
                                                  in ActivationFlags flags)
                        raises (MateComponent::Activation::ParseFailed,
                                MateComponent::Activation::IncompleteContext,
                                MateComponent::GeneralError)
                        context ("username", "hostname");
                ActivationResult activateFromAidFull (in ActivationID     aid,
                                                      in ActivationFlags  flags,
                                                      in ActivationClient client)
                        raises (MateComponent::Activation::ParseFailed,
                                MateComponent::Activation::IncompleteContext,
                                MateComponent::GeneralError)
                        context ("username", "hostname");

                long getVersion ();
        };
};

#ifndef __MateComponent_ActivationContext_COMPILATION
#ifdef  __MATECORBA_IDL__
#pragma inhibit pop
#endif
#endif

#endif
