fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / rsc / inc / rsccont.hxx
blobfe7ad8704765ff1dde58791d3d9d8749b9ff859e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef _RSCCONT_HXX
20 #define _RSCCONT_HXX
22 #include <rscall.h>
23 #include <rscerror.h>
24 #include <rsctop.hxx>
26 struct ENTRY_STRUCT {
27 RscId aName;
28 RSCINST aInst;
29 void Create(){ aName.Create(); aInst = RSCINST(); }
30 void Destroy();
32 struct RscBaseContInst {
33 sal_uInt32 nEntries;
34 ENTRY_STRUCT * pEntries;
35 sal_Bool bDflt;
38 class RscBaseCont : public RscTop
40 protected:
41 RscTop * pTypeClass; // Typ der Eintraege
42 RscTop * pTypeClass1;// Zwei verschiedene Typen moeglich
43 sal_Bool bNoId; // Keine Identifier
44 sal_uInt32 nSize; // Groesse der Instanzdaten dieser Klasse
45 // mit Superklassen
46 sal_uInt32 nOffInstData;// Offset auf eigen Instanzdaten
47 void DestroyElements( RscBaseContInst * pClassData );
48 RSCINST SearchElePos( const RSCINST & rInst, const RscId & rEleName,
49 RscTop * pClass, sal_uInt32 nPos );
50 protected:
51 void ContWriteSrc( const RSCINST & rInst, FILE * fOutput,
52 RscTypCont * pTC, sal_uInt32 nTab, const char * );
53 ERRTYPE ContWriteRc( const RSCINST & rInst, RscWriteRc & aMem,
54 RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
55 public:
56 RscBaseCont( Atom nId, sal_uInt32 nTypId,
57 RscTop * pSuper = NULL,
58 sal_Bool bNoId = sal_True );
59 ~RscBaseCont();
60 virtual RSCCLASS_TYPE GetClassType() const;
61 void SetTypeClass( RscTop * pClass, RscTop * pClass1 = NULL )
63 pTypeClass = pClass;
64 pTypeClass1 = pClass1;
66 RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool );
67 void Destroy( const RSCINST & rInst );
68 ERRTYPE GetElement( const RSCINST & rInst, const RscId & rEleName,
69 RscTop * pCreateClass, const RSCINST & rCreateInst,
70 RSCINST * pGetInst );
71 RSCINST SearchEle( const RSCINST & rInst, const RscId & rEleName,
72 RscTop * pClass );
73 sal_uInt32 GetCount( const RSCINST & rInst );
74 RSCINST GetPosEle( const RSCINST & rInst, sal_uInt32 nPos );
75 ERRTYPE MovePosEle( const RSCINST & rInst, sal_uInt32 nDestPos,
76 sal_uInt32 nSourcePos );
77 virtual ERRTYPE SetPosRscId( const RSCINST & rInst, sal_uInt32 nPos,
78 const RscId & rRscId);
79 SUBINFO_STRUCT GetInfoEle( const RSCINST & rInst, sal_uInt32 nPos );
80 ERRTYPE SetString( const RSCINST &, const char * pStr );
81 ERRTYPE SetNumber( const RSCINST &, sal_Int32 lValue );
82 ERRTYPE SetBool( const RSCINST & rInst, sal_Bool bValue );
83 ERRTYPE SetConst( const RSCINST & rInst, Atom nValueId,
84 sal_Int32 nValue );
85 ERRTYPE SetRef( const RSCINST & rInst, const RscId & rRefId );
87 // Gibt die Groesse der Klasse in Bytes
88 sal_uInt32 Size(){ return( nSize ); };
90 sal_Bool IsConsistent( const RSCINST & rInst );
91 void SetToDefault( const RSCINST & rInst );
92 sal_Bool IsDefault( const RSCINST & rInst );
93 sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
95 void Delete( const RSCINST & rInst, RscTop * pClass,
96 const RscId & rId );
97 void DeletePos( const RSCINST & rInst, sal_uInt32 nPos );
99 void WriteSrc( const RSCINST & rInst, FILE * fOutput,
100 RscTypCont * pTC, sal_uInt32 nTab, const char * );
101 ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
102 RscTypCont * pTC, sal_uInt32 , sal_Bool bExtra);
105 class RscContWriteSrc : public RscBaseCont
107 public:
108 RscContWriteSrc( Atom nId, sal_uInt32 nTypId,
109 RscTop * pSuper = NULL,
110 sal_Bool bNoId = sal_True );
111 void WriteSrc( const RSCINST & rInst, FILE * fOutput,
112 RscTypCont * pTC, sal_uInt32 nTab, const char * );
115 class RscCont : public RscContWriteSrc {
116 public:
117 RscCont( Atom nId, sal_uInt32 nTypId,
118 RscTop * pSuper = NULL,
119 sal_Bool bNoId = sal_True );
120 ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
121 RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
124 class RscContExtraData : public RscContWriteSrc {
125 public:
126 RscContExtraData( Atom nId, sal_uInt32 nTypId,
127 RscTop * pSuper = NULL,
128 sal_Bool bNoId = sal_True );
129 ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
130 RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
133 #endif //_RSCCONT_HXX
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */