/usr/include/omniORB4/internal/omniCurrent.h is in libomniorb4-dev 4.2.2-0.8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | // -*- Mode: C++; -*-
// Package : omniORB
// omniCurrent.h Created on: 2001/06/01
// Author : Duncan Grisby (dpg1)
//
// Copyright (C) 2002-2011 Apasphere Ltd
// Copyright (C) 2001 AT&T Research Cambridge
//
// This file is part of the omniORB library.
//
// The omniORB 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.1 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, see http://www.gnu.org/licenses/
//
//
// Description:
// Generic support for the kinds of Current interface.
//
#ifndef __OMNICURRENT_H__
#define __OMNICURRENT_H__
#include <omnithread.h>
#include <omniORB4/omniORB.h>
#include <omniORB4/omniInternal.h>
#include <omniORB4/callDescriptor.h>
#include <orbParameters.h>
#if !defined(_core_attr)
# define _core_attr_defined
# if defined(_OMNIORB_LIBRARY)
# define _core_attr
# else
# define _core_attr _OMNIORB_NTDLL_IMPORT
# endif
#endif
class omniCurrent : public omni_thread::value_t {
public:
omniCurrent(omni_thread* thread);
// Should really be private but some compilers warn about a class
// with only a private constructor and no friends.
virtual ~omniCurrent();
static void init();
static inline omniCurrent* get()
{
if (!_OMNI_NS(orbParameters)::supportCurrent) return 0;
omni_thread* thr = omni_thread::self();
if (!thr || !thread_key) return 0;
omniCurrent* current = (omniCurrent*)(thr->get_value(thread_key));
if (!current)
current = new omniCurrent(thr);
return current;
}
static inline omniCurrent* get(omni_thread* thr)
{
if (!thread_key) return 0;
omniCurrent* current = (omniCurrent*)(thr->get_value(thread_key));
if (!current)
current = new omniCurrent(thr);
return current;
}
// Accessors
inline omniCallDescriptor* callDescriptor() { return pd_callDescriptor; }
inline const omni_time_t& timeout() { return pd_timeout; }
inline CORBA::Boolean timeout_absolute() { return pd_timeout_absolute; }
// Stack manipulation
inline void setCallDescriptor(omniCallDescriptor* desc)
{
pd_callDescriptor = desc;
}
// Timeout setting
inline void setTimeout(unsigned long secs, unsigned long ns)
{
pd_timeout.assign(secs, ns);
pd_timeout_absolute = 0;
}
inline void setTimeout(const omni_time_t& t)
{
pd_timeout = t;
pd_timeout_absolute = 0;
}
inline void setDeadline(unsigned long secs, unsigned long ns)
{
pd_timeout.assign(secs, ns);
pd_timeout_absolute = 1;
}
inline void setDeadline(const omni_time_t& t)
{
pd_timeout = t;
pd_timeout_absolute = 1;
}
private:
static _core_attr omni_thread::key_t thread_key;
omniCallDescriptor* pd_callDescriptor;
// Stack of call descriptors
omni_time_t pd_timeout;
// Per-thread timeout
CORBA::Boolean pd_timeout_absolute;
// If true, timeout is an absolute completion time, otherwise it's a
// time per call.
// Not implemented:
omniCurrent(const omniCurrent&);
omniCurrent& operator=(const omniCurrent&);
};
#ifdef _core_attr_defined
# undef _core_attr
# undef _core_attr_defined
#endif
#endif // __OMNICURRENT_H__
|