// This file is generated by omniidl (C++ backend)- omniORB_3_0. Do not edit.
#ifndef __tp1_hh__
#define __tp1_hh__

#ifndef USE_omniORB_logStream
#define USE_omniORB_logStream
#endif

#ifndef __CORBA_H_EXTERNAL_GUARD__
#include <omniORB3/CORBA.h>
#endif

#ifndef  USE_core_stub_in_nt_dll
# define USE_core_stub_in_nt_dll_NOT_DEFINED_tp1
#endif
#ifndef  USE_dyn_stub_in_nt_dll
# define USE_dyn_stub_in_nt_dll_NOT_DEFINED_tp1
#endif

#ifdef USE_stub_in_nt_dll
#ifndef USE_core_stub_in_nt_dll
#define USE_core_stub_in_nt_dll
#endif
#ifndef USE_dyn_stub_in_nt_dll
#define USE_dyn_stub_in_nt_dll
#endif
#endif

#ifdef _core_attr
# error "A local CPP macro _core_attr has already been defined."
#else
# ifdef  USE_core_stub_in_nt_dll
#  define _core_attr _OMNIORB_NTDLL_IMPORT
# else
#  define _core_attr
# endif
#endif

#ifdef _dyn_attr
# error "A local CPP macro _dyn_attr has already been defined."
#else
# ifdef  USE_dyn_stub_in_nt_dll
#  define _dyn_attr _OMNIORB_NTDLL_IMPORT
# else
#  define _dyn_attr
# endif
#endif

#ifndef __bookmark__
#define __bookmark__

class bookmark;
class _objref_bookmark;
class _impl_bookmark;

typedef _objref_bookmark* bookmark_ptr;
typedef bookmark_ptr bookmarkRef;

class bookmark_Helper {
public:
  typedef bookmark_ptr _ptr_type;

  static _ptr_type _nil();
  static _CORBA_Boolean is_nil(_ptr_type);
  static void release(_ptr_type);
  static void duplicate(_ptr_type);
  static size_t NP_alignedSize(_ptr_type, size_t);
  static void marshalObjRef(_ptr_type, NetBufferedStream&);
  static _ptr_type unmarshalObjRef(NetBufferedStream&);
  static void marshalObjRef(_ptr_type, MemBufferedStream&);
  static _ptr_type unmarshalObjRef(MemBufferedStream&);
};

typedef _CORBA_ObjRef_Var<_objref_bookmark, bookmark_Helper> bookmark_var;
typedef _CORBA_ObjRef_OUT_arg<_objref_bookmark,bookmark_Helper > bookmark_out;

#endif

class bookmark {
public:
  // Declarations for this interface type.
  typedef bookmark_ptr _ptr_type;
  typedef bookmark_var _var_type;

  static _ptr_type _duplicate(_ptr_type);
  static _ptr_type _narrow(CORBA::Object_ptr);
  static _ptr_type _nil();

  static inline size_t _alignedSize(_ptr_type, size_t);
  static inline void _marshalObjRef(_ptr_type, NetBufferedStream&);
  static inline void _marshalObjRef(_ptr_type, MemBufferedStream&);

  static inline _ptr_type _unmarshalObjRef(NetBufferedStream& s) {
    CORBA::Object_ptr obj = CORBA::UnMarshalObjRef(_PD_repoId, s);
    _ptr_type result = _narrow(obj);
    CORBA::release(obj);
    return result;
  }

  static inline _ptr_type _unmarshalObjRef(MemBufferedStream& s) {
    CORBA::Object_ptr obj = CORBA::UnMarshalObjRef(_PD_repoId, s);
    _ptr_type result = _narrow(obj);
    CORBA::release(obj);
    return result;
  }

  static _core_attr const char* _PD_repoId;

  // Other IDL defined within this scope.
  
};

class _objref_bookmark :
  public virtual CORBA::Object, public virtual omniObjRef
{
public:
  void Ajouter(const char* alias, const char* url);
  void Supprimer(const char* alias);
  char* Recherche(const char* alias);
  void Sauvegarder(const char* fichier);
  
  inline _objref_bookmark() { _PR_setobj(0); }  // nil
  _objref_bookmark(const char*, IOP::TaggedProfileList*, omniIdentity*, omniLocalIdentity*);

protected:
  virtual ~_objref_bookmark();

private:
  virtual void* _ptrToObjRef(const char*);

  _objref_bookmark(const _objref_bookmark&);
  _objref_bookmark& operator = (const _objref_bookmark&);
  // not implemented
};

class _pof_bookmark : public proxyObjectFactory {
public:
  inline _pof_bookmark() : proxyObjectFactory(bookmark::_PD_repoId) {}
  virtual ~_pof_bookmark();

  virtual omniObjRef* newObjRef(const char*, IOP::TaggedProfileList*,
                                omniIdentity*, omniLocalIdentity*);
  virtual _CORBA_Boolean is_a(const char*) const;
};

class _impl_bookmark :
  public virtual omniServant
{
public:
  virtual ~_impl_bookmark();

  virtual void Ajouter(const char* alias, const char* url) = 0;
  virtual void Supprimer(const char* alias) = 0;
  virtual char* Recherche(const char* alias) = 0;
  virtual void Sauvegarder(const char* fichier) = 0;
  
public:  // Really protected, workaround for xlC
  virtual _CORBA_Boolean _dispatch(GIOP_S&);

private:
  virtual void* _ptrToInterface(const char*);
  virtual const char* _mostDerivedRepoId();
};

class POA_bookmark :
  public virtual _impl_bookmark,
  public virtual PortableServer::ServantBase
{
public:
  virtual ~POA_bookmark();

  inline bookmark_ptr _this() {
    return (bookmark_ptr) _do_this(bookmark::_PD_repoId);
  }
};

#undef _core_attr
#undef _dyn_attr

inline size_t
bookmark::_alignedSize(bookmark_ptr obj, size_t offset) {
  return CORBA::AlignedObjRef(obj, _PD_repoId, 17, offset);
}

inline void
bookmark::_marshalObjRef(bookmark_ptr obj, NetBufferedStream& s) {
  CORBA::MarshalObjRef(obj, _PD_repoId, 17, s);
}

inline void
bookmark::_marshalObjRef(bookmark_ptr obj, MemBufferedStream& s) {
  CORBA::MarshalObjRef(obj, _PD_repoId, 17, s);
}

#ifdef   USE_core_stub_in_nt_dll_NOT_DEFINED_tp1
# undef  USE_core_stub_in_nt_dll
# undef  USE_core_stub_in_nt_dll_NOT_DEFINED_tp1
#endif
#ifdef   USE_dyn_stub_in_nt_dll_NOT_DEFINED_tp1
# undef  USE_dyn_stub_in_nt_dll
# undef  USE_dyn_stub_in_nt_dll_NOT_DEFINED_tp1
#endif

#endif  // __tp1_hh__

