1/* 2 * Copyright 2019 Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Niels Sascha Reedijk, niels.reedijk@gmail.com 7 * 8 * Corresponds to: 9 * headers/os/app/Key.h hrev45343 10 * src/kits/app/Key.cpp hrev45343 11 */ 12 13 14 /*! 15 \file Key.h 16 \ingroup app 17 \ingroup libbe 18 \brief Provides BKey and BPasswordKey classes, as well as BKeyPurpose and 19 BKeyType enums. 20*/ 21 22 23 ///// BKeyPurpose enum ///// 24 25 26/*! 27 \enum BKeyPurpose 28 \brief Undocumented 29 30 \since Haiku R1 31*/ 32 33 34/*! 35 \var BKeyPurpose::B_KEY_PURPOSE_ANY 36 \brief Undocumented 37 38 \since Haiku R1 39*/ 40 41 42/*! 43 \var BKeyPurpose::B_KEY_PURPOSE_GENERIC 44 \brief Undocumented 45 46 \since Haiku R1 47*/ 48 49 50/*! 51 \var BKeyPurpose::B_KEY_PURPOSE_KEYRING 52 \brief Undocumented 53 54 \since Haiku R1 55*/ 56 57 58/*! 59 \var BKeyPurpose::B_KEY_PURPOSE_WEB 60 \brief Undocumented 61 62 \since Haiku R1 63*/ 64 65 66/*! 67 \var BKeyPurpose::B_KEY_PURPOSE_NETWORK 68 \brief Undocumented 69 70 \since Haiku R1 71*/ 72 73 74/*! 75 \var BKeyPurpose::B_KEY_PURPOSE_VOLUME 76 \brief Undocumented 77 78 \since Haiku R1 79*/ 80 81 82 ///// BKeyType enum ///// 83 84 85/*! 86 \enum BKeyType 87 \brief Undocumented 88 89 \since Haiku R1 90*/ 91 92 93/*! 94 \var BKeyType::B_KEY_TYPE_ANY 95 \brief Undocumented 96 97 \since Haiku R1 98*/ 99 100 101/*! 102 \var BKeyType::B_KEY_TYPE_GENERIC 103 \brief Undocumented 104 105 \since Haiku R1 106*/ 107 108 109/*! 110 \var BKeyType::B_KEY_TYPE_PASSWORD 111 \brief Undocumented 112 113 \since Haiku R1 114*/ 115 116 117/*! 118 \var BKeyType::B_KEY_TYPE_CERTIFICATE 119 \brief Undocumented 120 121 \since Haiku R1 122*/ 123 124 125///// BKey class ///// 126 127 128/*! 129 \class BKey 130 \brief Undocumented 131 132 \since Haiku R1 133*/ 134 135 136/*! 137 \fn BKey::BKey(); 138 \brief Undocumented 139 140 \since Haiku R1 141*/ 142 143 144/*! 145 \fn BKey::BKey(BKeyPurpose purpose, const char* identifier, 146 const char* secondaryIdentifier = NULL, const uint8* data = NULL, 147 size_t length = 0) 148 \brief Undocumented 149 150 \since Haiku R1 151*/ 152 153 154/*! 155 \fn BKey::BKey(BKey& other) 156 \brief Undocumented 157 158 \since Haiku R1 159*/ 160 161 162/*! 163 \fn virtual BKey::~BKey() 164 \brief Undocumented 165 166 \since Haiku R1 167*/ 168 169 170/*! 171 \fn virtual BKeyType BKey::Type() const 172 \brief Undocumented 173 174 \since Haiku R1 175*/ 176 177 178/*! 179 \fn void BKey::Unset() 180 \brief Undocumented 181 182 \since Haiku R1 183*/ 184 185 186/*! 187 \fn status_t BKey::SetTo(BKeyPurpose purpose, const char* identifier, 188 const char* secondaryIdentifier = NULL, const uint8* data = NULL, 189 size_t length = 0) 190 \brief Undocumented 191 192 \since Haiku R1 193*/ 194 195 196/*! 197 \fn void BKey::SetPurpose(BKeyPurpose purpose) 198 \brief Undocumented 199 200 \since Haiku R1 201*/ 202 203 204/*! 205 \fn BKeyPurpose BKey::Purpose() const 206 \brief Undocumented 207 208 \since Haiku R1 209*/ 210 211 212/*! 213 \fn void BKey::SetIdentifier(const char* identifier) 214 \brief Undocumented 215 216 \since Haiku R1 217*/ 218 219 220/*! 221 \fn const char* BKey::Identifier() const 222 \brief Undocumented 223 224 \since Haiku R1 225*/ 226 227 228/*! 229 \fn void BKey::SetSecondaryIdentifier(const char* identifier) 230 \brief Undocumented 231 232 \since Haiku R1 233*/ 234 235 236/*! 237 \fn const char* BKey::SecondaryIdentifier() const 238 \brief Undocumented 239 240 \since Haiku R1 241*/ 242 243 244/*! 245 \fn status_t BKey::SetData(const uint8* data, size_t length) 246 \brief Undocumented 247 248 \since Haiku R1 249*/ 250 251 252/*! 253 \fn size_t BKey::DataLength() const 254 \brief Undocumented 255 256 \since Haiku R1 257*/ 258 259 260/*! 261 \fn const uint8* BKey::Data() const 262 \brief Undocumented 263 264 \since Haiku R1 265*/ 266 267 268/*! 269 \fn status_t BKey::GetData(uint8* buffer, size_t bufferSize) const 270 \brief Undocumented 271 272 \since Haiku R1 273*/ 274 275 276/*! 277 \fn const char* BKey::Owner() const 278 \brief Undocumented 279 280 \since Haiku R1 281*/ 282 283 284/*! 285 \fn bigtime_t BKey::CreationTime() const 286 \brief Undocumented 287 288 \since Haiku R1 289*/ 290 291 292/*! 293 \fn virtual status_t BKey::Flatten(BMessage& message) const 294 \brief Undocumented 295 296 \since Haiku R1 297*/ 298 299 300/*! 301 \fn virtual status_t BKey::Unflatten(const BMessage& message) 302 \brief Undocumented 303 304 \since Haiku R1 305*/ 306 307 308/*! 309 \fn BKey& BKey::operator=(const BKey& other) 310 \brief Undocumented 311 312 \since Haiku R1 313*/ 314 315 316/*! 317 \fn bool BKey::operator==(const BKey& other) const 318 \brief Undocumented 319 320 \since Haiku R1 321*/ 322 323 324/*! 325 \fn bool BKey::operator!=(const BKey& other) const 326 \brief Undocumented 327 328 \since Haiku R1 329*/ 330 331 332/*! 333 \fn virtual void BKey::PrintToStream(); 334 \brief Undocumented 335 336 \since Haiku R1 337*/ 338 339 340///// BPasswordKey class ///// 341 342 343 344/*! 345 \class BPasswordKey 346 \brief Undocumented 347 348 \since Haiku R1 349*/ 350 351/*! 352 \fn BPasswordKey::BPasswordKey() 353 \brief Undocumented 354 355 \since Haiku R1 356*/ 357 358 359/*! 360 \fn BPasswordKey::BPasswordKey(const char* password, BKeyPurpose purpose, 361 const char* identifier, const char* secondaryIdentifier = NULL) 362 \brief Undocumented 363 364 \since Haiku R1 365*/ 366 367 368/*! 369 \fn BPasswordKey::BPasswordKey(BPasswordKey& other) 370 \brief Undocumented 371 372 \since Haiku R1 373*/ 374 375 376/*! 377 \fn virtual BPasswordKey::~BPasswordKey() 378 \brief Undocumented 379 380 \since Haiku R1 381*/ 382 383 384/*! 385 \fn virtual BKeyType BPasswordKey::Type() const 386 \brief Undocumented 387 388 \since Haiku R1 389*/ 390 391 392/*! 393 \fn status_t BPasswordKey::SetTo(const char* password, BKeyPurpose purpose, 394 const char* identifier, const char* secondaryIdentifier = NULL) 395 \brief Undocumented 396 397 \since Haiku R1 398*/ 399 400 401/*! 402 \fn status_t BPasswordKey::SetPassword(const char* password) 403 \brief Undocumented 404 405 \since Haiku R1 406*/ 407 408 409/*! 410 \fn const char* BPasswordKey::Password() const 411 \brief Undocumented 412 413 \since Haiku R1 414*/ 415 416 417/*! 418 \fn virtual void BPasswordKey::PrintToStream() 419 \brief Undocumented 420 421 \since Haiku R1 422*/ 423