Changeset View
Changeset View
Standalone View
Standalone View
src/lib/util/kuser.h
Show First 20 Lines • Show All 298 Lines • ▼ Show 20 Line(s) | 267 | #endif | |||
---|---|---|---|---|---|
299 | bool isValid() const; | 299 | bool isValid() const; | ||
300 | 300 | | |||
301 | /** @return the native user id of the user. */ | 301 | /** @return the native user id of the user. */ | ||
302 | KUserId userId() const; | 302 | KUserId userId() const; | ||
303 | 303 | | |||
304 | /** @return the native user id of the user. */ | 304 | /** @return the native user id of the user. */ | ||
305 | KGroupId groupId() const; | 305 | KGroupId groupId() const; | ||
306 | 306 | | |||
307 | #ifndef KCOREADDONS_NO_DEPRECATED | 307 | #if KCOREADDONS_ENABLE_DEPRECATED_SINCE(5, 0) | ||
308 | /** | 308 | /** | ||
309 | * Returns the group id of the user. | 309 | * Returns the group id of the user. | ||
310 | * @return the id of the group or -1 if user is invalid | 310 | * @return the id of the group or -1 if user is invalid | ||
311 | * @deprecated since 5.0 use KUser::groupId() | 311 | * @deprecated since 5.0 use KUser::groupId() | ||
312 | */ | 312 | */ | ||
313 | KCOREADDONS_DEPRECATED K_GID gid() const | 313 | KCOREADDONS_DEPRECATED_VERSION(5, 0) | ||
314 | K_GID gid() const | ||||
314 | { | 315 | { | ||
315 | return groupId().nativeId(); | 316 | return groupId().nativeId(); | ||
316 | } | 317 | } | ||
317 | #endif | 318 | #endif | ||
318 | 319 | | |||
319 | /** | 320 | /** | ||
320 | * Checks whether the user is the super user (root). | 321 | * Checks whether the user is the super user (root). | ||
321 | * @return true if the user is root | 322 | * @return true if the user is root | ||
322 | */ | 323 | */ | ||
323 | bool isSuperUser() const; | 324 | bool isSuperUser() const; | ||
324 | 325 | | |||
325 | /** | 326 | /** | ||
326 | * The login name of the user. | 327 | * The login name of the user. | ||
327 | * @return the login name of the user or QString() if user is invalid | 328 | * @return the login name of the user or QString() if user is invalid | ||
328 | */ | 329 | */ | ||
329 | QString loginName() const; | 330 | QString loginName() const; | ||
330 | 331 | | |||
332 | #if KCOREADDONS_ENABLE_DEPRECATED_SINCE(5, 0) | ||||
331 | /** | 333 | /** | ||
332 | * The full name of the user. | 334 | * The full name of the user. | ||
333 | * @return the full name of the user or QString() if user is invalid | 335 | * @return the full name of the user or QString() if user is invalid | ||
334 | * @deprecated use property(KUser::FullName) instead | 336 | * @deprecated use property(KUser::FullName) instead | ||
335 | */ | 337 | */ | ||
336 | #ifndef KCOREADDONS_NO_DEPRECATED | 338 | KCOREADDONS_DEPRECATED_VERSION(5, 0) | ||
337 | KCOREADDONS_DEPRECATED QString fullName() const | 339 | QString fullName() const | ||
338 | { | 340 | { | ||
339 | return property(FullName).toString(); | 341 | return property(FullName).toString(); | ||
340 | } | 342 | } | ||
341 | /** | 343 | /** | ||
342 | * Returns the user id of the user. | 344 | * Returns the user id of the user. | ||
343 | * @return the id of the user or -1 (UNIX)/ null(Windows) if user is invalid | 345 | * @return the id of the user or -1 (UNIX)/ null(Windows) if user is invalid | ||
344 | * @deprecated since 5.0 use KUser::userId() | 346 | * @deprecated since 5.0 use KUser::userId() | ||
345 | */ | 347 | */ | ||
346 | KCOREADDONS_DEPRECATED K_UID uid() const | 348 | KCOREADDONS_DEPRECATED_VERSION(5, 0) | ||
349 | K_UID uid() const | ||||
347 | { | 350 | { | ||
348 | return userId().nativeId(); | 351 | return userId().nativeId(); | ||
349 | } | 352 | } | ||
350 | #endif | 353 | #endif | ||
351 | 354 | | |||
352 | /** | 355 | /** | ||
353 | * The path to the user's home directory. | 356 | * The path to the user's home directory. | ||
354 | * @return the home directory of the user or QString() if the | 357 | * @return the home directory of the user or QString() if the | ||
▲ Show 20 Lines • Show All 157 Lines • ▼ Show 20 Line(s) | 486 | #endif | |||
512 | /** | 515 | /** | ||
513 | * Returns whether the group is valid. | 516 | * Returns whether the group is valid. | ||
514 | * A KUserGroup object can be invalid if it is | 517 | * A KUserGroup object can be invalid if it is | ||
515 | * created with a non-existing gid or name. | 518 | * created with a non-existing gid or name. | ||
516 | * @return true if the group is valid | 519 | * @return true if the group is valid | ||
517 | */ | 520 | */ | ||
518 | bool isValid() const; | 521 | bool isValid() const; | ||
519 | 522 | | |||
520 | #ifndef KCOREADDONS_NO_DEPRECATED | 523 | #if KCOREADDONS_ENABLE_DEPRECATED_SINCE(5, 0) | ||
521 | /** | 524 | /** | ||
522 | * Returns the group id of the group. | 525 | * Returns the group id of the group. | ||
523 | * @return the group id of the group or -1 if the group is invalid | 526 | * @return the group id of the group or -1 if the group is invalid | ||
524 | * @deprecated since 5.0 use KUserGroup::groupId() | 527 | * @deprecated since 5.0 use KUserGroup::groupId() | ||
525 | */ | 528 | */ | ||
526 | KCOREADDONS_DEPRECATED K_GID gid() const | 529 | KCOREADDONS_DEPRECATED_VERSION(5, 0) | ||
530 | K_GID gid() const | ||||
527 | { | 531 | { | ||
528 | return groupId().nativeId(); | 532 | return groupId().nativeId(); | ||
529 | } | 533 | } | ||
530 | #endif | 534 | #endif | ||
531 | 535 | | |||
532 | /** @return the native group id of the user. */ | 536 | /** @return the native group id of the user. */ | ||
533 | KGroupId groupId() const; | 537 | KGroupId groupId() const; | ||
534 | 538 | | |||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |