1 /* 2 ** Distributed under the terms of the MIT License. 3 ** Copyright 2003-2004,2012. All rights reserved. 4 ** 5 ** Authors: Axel Dörfler, axeld@pinc-software.de 6 ** Oliver Tappe, zooey@hirschkaefer.de 7 */ 8 9 #include <CatalogData.h> 10 11 12 // Provides an empty implementation of BCatalogData for the build host. 13 14 15 BCatalogData::BCatalogData(const char *signature, const char *language, 16 uint32 fingerprint) 17 : 18 fInitCheck(B_NO_INIT), 19 fSignature(signature), 20 fLanguageName(language), 21 fFingerprint(fingerprint), 22 fNext(NULL) 23 { 24 fLanguageName.ToLower(); 25 // canonicalize language-name to lowercase 26 } 27 28 29 BCatalogData::~BCatalogData() 30 { 31 } 32 33 34 void 35 BCatalogData::UpdateFingerprint() 36 { 37 fFingerprint = 0; 38 // base implementation always yields the same fingerprint, 39 // which means that no version-mismatch detection is possible. 40 } 41 42 43 status_t 44 BCatalogData::InitCheck() const 45 { 46 return fInitCheck; 47 } 48 49 50 bool 51 BCatalogData::CanHaveData() const 52 { 53 return false; 54 } 55 56 57 status_t 58 BCatalogData::GetData(const char *name, BMessage *msg) 59 { 60 return EOPNOTSUPP; 61 } 62 63 64 status_t 65 BCatalogData::GetData(uint32 id, BMessage *msg) 66 { 67 return EOPNOTSUPP; 68 } 69 70 71 status_t 72 BCatalogData::SetString(const char *string, const char *translated, 73 const char *context, const char *comment) 74 { 75 return EOPNOTSUPP; 76 } 77 78 79 status_t 80 BCatalogData::SetString(int32 id, const char *translated) 81 { 82 return EOPNOTSUPP; 83 } 84 85 86 bool 87 BCatalogData::CanWriteData() const 88 { 89 return false; 90 } 91 92 93 status_t 94 BCatalogData::SetData(const char *name, BMessage *msg) 95 { 96 return EOPNOTSUPP; 97 } 98 99 100 status_t 101 BCatalogData::SetData(uint32 id, BMessage *msg) 102 { 103 return EOPNOTSUPP; 104 } 105 106 107 status_t 108 BCatalogData::ReadFromFile(const char *path) 109 { 110 return EOPNOTSUPP; 111 } 112 113 114 status_t 115 BCatalogData::ReadFromAttribute(const entry_ref &appOrAddOnRef) 116 { 117 return EOPNOTSUPP; 118 } 119 120 121 status_t 122 BCatalogData::ReadFromResource(const entry_ref &appOrAddOnRef) 123 { 124 return EOPNOTSUPP; 125 } 126 127 128 status_t 129 BCatalogData::WriteToFile(const char *path) 130 { 131 return EOPNOTSUPP; 132 } 133 134 135 status_t 136 BCatalogData::WriteToAttribute(const entry_ref &appOrAddOnRef) 137 { 138 return EOPNOTSUPP; 139 } 140 141 142 status_t 143 BCatalogData::WriteToResource(const entry_ref &appOrAddOnRef) 144 { 145 return EOPNOTSUPP; 146 } 147 148 149 void BCatalogData::MakeEmpty() 150 { 151 } 152 153 154 int32 155 BCatalogData::CountItems() const 156 { 157 return 0; 158 } 159