2 * Copyright 2002-2006, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
7 * Axel Dörfler, axeld@pinc-software.de
11 #include "TranslatorRosterPrivate.h"
13 #include <Translator.h>
16 BTranslator::BTranslator()
25 BTranslator::~BTranslator()
27 if (fOwningRoster
!= NULL
)
28 fOwningRoster
->TranslatorDeleted(fID
);
33 Increments the refcount and returns a pointer to this object.
35 BTranslator
*BTranslator::Acquire()
37 if (atomic_add(&fRefCount
, 1) > 0)
45 Decrements the refcount and returns a pointer to this object.
46 When the refcount hits zero, the object is destroyed. This is
47 so multiple objects can own the BTranslator and it won't get
48 deleted until all of them are done with it.
50 \return NULL, if the object was just deleted
52 BTranslator
*BTranslator::Release()
54 int32 oldValue
= atomic_add(&fRefCount
, -1);
64 BTranslator::ReferenceCount()
71 This virtual function is for creating a configuration view
72 for the translator so the user can change its settings.
73 This method is optional.
76 BTranslator::MakeConfigurationView(BMessage
* ioExtension
,
77 BView
** outView
, BRect
* outExtent
)
84 Puts the current configuration for the translator into
85 ioExtension. This method is optional.
88 BTranslator::GetConfigurationMessage(BMessage
* ioExtension
)
94 status_t
BTranslator::_Reserved_Translator_0(int32 n
, void *p
) { return B_ERROR
; }
95 status_t
BTranslator::_Reserved_Translator_1(int32 n
, void *p
) { return B_ERROR
; }
96 status_t
BTranslator::_Reserved_Translator_2(int32 n
, void *p
) { return B_ERROR
; }
97 status_t
BTranslator::_Reserved_Translator_3(int32 n
, void *p
) { return B_ERROR
; }
98 status_t
BTranslator::_Reserved_Translator_4(int32 n
, void *p
) { return B_ERROR
; }
99 status_t
BTranslator::_Reserved_Translator_5(int32 n
, void *p
) { return B_ERROR
; }
100 status_t
BTranslator::_Reserved_Translator_6(int32 n
, void *p
) { return B_ERROR
; }
101 status_t
BTranslator::_Reserved_Translator_7(int32 n
, void *p
) { return B_ERROR
; }