summaryrefslogtreecommitdiff
path: root/CIAO/ciao/CCM_Context.idl
blob: 7379c20b918a914924f683b71973b97dcd3e3acc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// $Id$

/**
 * @@ Compile this file with:
 *
 *     tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \
 *          -Wb,export_macro=CIAO_Export \
 *          -Wb,export_include=CIAO_export.h \
 *          -Wb,pre_include="ace/pre.h" \
 *          -Wb,post_include="ace/post.h" \
 *          CCM_Container.idl
 */

//#define CIAO_HAS_IMPORT_KEYWORD

#if !defined (CCM_CONTEXT_IDL)
#define CCM_CONTEXT_IDL

#include "orbsvcs/SecurityLevel2.idl"
#include "CCM_Transaction.idl"
#include "CCM_Home.idl"

// *************** Basic Container interfaces ***************

module Components
{
  typeprefix Components "omg.org";

  typedef SecurityLevel2::Credentials Principal;

  exception IllegalState {};

  local interface CCMContext
  {
    Principal get_caller_principal();

    CCMHome get_CCM_home();

    boolean get_rollback_only()
      raises (IllegalState);

    Transaction::UserTransaction get_user_transaction()
      raises (IllegalState);

    boolean is_caller_in_role (in string role);

    void set_rollback_only()
      raises (IllegalState);
  };
};
#endif /* CCM_CONTEXT_IDL */