1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863
|
// Code generated by "./generator ./com.deepin.daemon.accounts"; DO NOT EDIT.
package accounts
import (
"errors"
"fmt"
"unsafe"
"github.com/godbus/dbus"
"pkg.deepin.io/lib/dbusutil"
"pkg.deepin.io/lib/dbusutil/proxy"
)
type Accounts struct {
accounts // interface com.deepin.daemon.Accounts
proxy.Object
}
func NewAccounts(conn *dbus.Conn) *Accounts {
obj := new(Accounts)
obj.Object.Init_(conn, "com.deepin.daemon.Accounts", "/com/deepin/daemon/Accounts")
return obj
}
type accounts struct{}
func (v *accounts) GetObject_() *proxy.Object {
return (*proxy.Object)(unsafe.Pointer(v))
}
func (*accounts) GetInterfaceName_() string {
return "com.deepin.daemon.Accounts"
}
// method AllowGuestAccount
func (v *accounts) GoAllowGuestAccount(flags dbus.Flags, ch chan *dbus.Call, allow bool) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".AllowGuestAccount", flags, ch, allow)
}
func (v *accounts) AllowGuestAccount(flags dbus.Flags, allow bool) error {
return (<-v.GoAllowGuestAccount(flags, make(chan *dbus.Call, 1), allow).Done).Err
}
// method CreateGuestAccount
func (v *accounts) GoCreateGuestAccount(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".CreateGuestAccount", flags, ch)
}
func (*accounts) StoreCreateGuestAccount(call *dbus.Call) (user string, err error) {
err = call.Store(&user)
return
}
func (v *accounts) CreateGuestAccount(flags dbus.Flags) (user string, err error) {
return v.StoreCreateGuestAccount(
<-v.GoCreateGuestAccount(flags, make(chan *dbus.Call, 1)).Done)
}
// method CreateUser
func (v *accounts) GoCreateUser(flags dbus.Flags, ch chan *dbus.Call, name string, fullName string, type0 int32) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".CreateUser", flags, ch, name, fullName, type0)
}
func (*accounts) StoreCreateUser(call *dbus.Call) (user dbus.ObjectPath, err error) {
err = call.Store(&user)
return
}
func (v *accounts) CreateUser(flags dbus.Flags, name string, fullName string, type0 int32) (user dbus.ObjectPath, err error) {
return v.StoreCreateUser(
<-v.GoCreateUser(flags, make(chan *dbus.Call, 1), name, fullName, type0).Done)
}
// method DeleteUser
func (v *accounts) GoDeleteUser(flags dbus.Flags, ch chan *dbus.Call, name string, rmFiles bool) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".DeleteUser", flags, ch, name, rmFiles)
}
func (v *accounts) DeleteUser(flags dbus.Flags, name string, rmFiles bool) error {
return (<-v.GoDeleteUser(flags, make(chan *dbus.Call, 1), name, rmFiles).Done).Err
}
// method FindUserById
func (v *accounts) GoFindUserById(flags dbus.Flags, ch chan *dbus.Call, uid string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".FindUserById", flags, ch, uid)
}
func (*accounts) StoreFindUserById(call *dbus.Call) (user string, err error) {
err = call.Store(&user)
return
}
func (v *accounts) FindUserById(flags dbus.Flags, uid string) (user string, err error) {
return v.StoreFindUserById(
<-v.GoFindUserById(flags, make(chan *dbus.Call, 1), uid).Done)
}
// method FindUserByName
func (v *accounts) GoFindUserByName(flags dbus.Flags, ch chan *dbus.Call, name string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".FindUserByName", flags, ch, name)
}
func (*accounts) StoreFindUserByName(call *dbus.Call) (user string, err error) {
err = call.Store(&user)
return
}
func (v *accounts) FindUserByName(flags dbus.Flags, name string) (user string, err error) {
return v.StoreFindUserByName(
<-v.GoFindUserByName(flags, make(chan *dbus.Call, 1), name).Done)
}
// method IsPasswordValid
func (v *accounts) GoIsPasswordValid(flags dbus.Flags, ch chan *dbus.Call, password string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".IsPasswordValid", flags, ch, password)
}
func (*accounts) StoreIsPasswordValid(call *dbus.Call) (ok bool, errReason string, errCode int32, err error) {
err = call.Store(&ok, &errReason, &errCode)
return
}
func (v *accounts) IsPasswordValid(flags dbus.Flags, password string) (ok bool, errReason string, errCode int32, err error) {
return v.StoreIsPasswordValid(
<-v.GoIsPasswordValid(flags, make(chan *dbus.Call, 1), password).Done)
}
// method IsUsernameValid
func (v *accounts) GoIsUsernameValid(flags dbus.Flags, ch chan *dbus.Call, name string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".IsUsernameValid", flags, ch, name)
}
func (*accounts) StoreIsUsernameValid(call *dbus.Call) (ok bool, errReason string, errCode int32, err error) {
err = call.Store(&ok, &errReason, &errCode)
return
}
func (v *accounts) IsUsernameValid(flags dbus.Flags, name string) (ok bool, errReason string, errCode int32, err error) {
return v.StoreIsUsernameValid(
<-v.GoIsUsernameValid(flags, make(chan *dbus.Call, 1), name).Done)
}
// method RandUserIcon
func (v *accounts) GoRandUserIcon(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".RandUserIcon", flags, ch)
}
func (*accounts) StoreRandUserIcon(call *dbus.Call) (iconFile string, err error) {
err = call.Store(&iconFile)
return
}
func (v *accounts) RandUserIcon(flags dbus.Flags) (iconFile string, err error) {
return v.StoreRandUserIcon(
<-v.GoRandUserIcon(flags, make(chan *dbus.Call, 1)).Done)
}
// signal UserAdded
func (v *accounts) ConnectUserAdded(cb func(objPath string)) (dbusutil.SignalHandlerId, error) {
if cb == nil {
return 0, errors.New("nil callback")
}
obj := v.GetObject_()
rule := fmt.Sprintf(
"type='signal',interface='%s',member='%s',path='%s',sender='%s'",
v.GetInterfaceName_(), "UserAdded", obj.Path_(), obj.ServiceName_())
sigRule := &dbusutil.SignalRule{
Path: obj.Path_(),
Name: v.GetInterfaceName_() + ".UserAdded",
}
handlerFunc := func(sig *dbus.Signal) {
var objPath string
err := dbus.Store(sig.Body, &objPath)
if err == nil {
cb(objPath)
}
}
return obj.ConnectSignal_(rule, sigRule, handlerFunc)
}
// signal UserDeleted
func (v *accounts) ConnectUserDeleted(cb func(objPath string)) (dbusutil.SignalHandlerId, error) {
if cb == nil {
return 0, errors.New("nil callback")
}
obj := v.GetObject_()
rule := fmt.Sprintf(
"type='signal',interface='%s',member='%s',path='%s',sender='%s'",
v.GetInterfaceName_(), "UserDeleted", obj.Path_(), obj.ServiceName_())
sigRule := &dbusutil.SignalRule{
Path: obj.Path_(),
Name: v.GetInterfaceName_() + ".UserDeleted",
}
handlerFunc := func(sig *dbus.Signal) {
var objPath string
err := dbus.Store(sig.Body, &objPath)
if err == nil {
cb(objPath)
}
}
return obj.ConnectSignal_(rule, sigRule, handlerFunc)
}
// property UserList as
func (v *accounts) UserList() proxy.PropStringArray {
return proxy.PropStringArray{
Impl: v,
Name: "UserList",
}
}
// property GuestIcon s
func (v *accounts) GuestIcon() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "GuestIcon",
}
}
// property AllowGuest b
func (v *accounts) AllowGuest() proxy.PropBool {
return proxy.PropBool{
Impl: v,
Name: "AllowGuest",
}
}
type User struct {
user // interface com.deepin.daemon.Accounts.User
proxy.Object
}
func NewUser(conn *dbus.Conn, path dbus.ObjectPath) (*User, error) {
if !path.IsValid() {
return nil, errors.New("path is invalid")
}
obj := new(User)
obj.Object.Init_(conn, "com.deepin.daemon.Accounts", path)
return obj, nil
}
type user struct{}
func (v *user) GetObject_() *proxy.Object {
return (*proxy.Object)(unsafe.Pointer(v))
}
func (*user) GetInterfaceName_() string {
return "com.deepin.daemon.Accounts.User"
}
// method AddGroup
func (v *user) GoAddGroup(flags dbus.Flags, ch chan *dbus.Call, group string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".AddGroup", flags, ch, group)
}
func (v *user) AddGroup(flags dbus.Flags, group string) error {
return (<-v.GoAddGroup(flags, make(chan *dbus.Call, 1), group).Done).Err
}
// method DeleteGroup
func (v *user) GoDeleteGroup(flags dbus.Flags, ch chan *dbus.Call, group string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".DeleteGroup", flags, ch, group)
}
func (v *user) DeleteGroup(flags dbus.Flags, group string) error {
return (<-v.GoDeleteGroup(flags, make(chan *dbus.Call, 1), group).Done).Err
}
// method DeleteIconFile
func (v *user) GoDeleteIconFile(flags dbus.Flags, ch chan *dbus.Call, iconFile string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".DeleteIconFile", flags, ch, iconFile)
}
func (v *user) DeleteIconFile(flags dbus.Flags, iconFile string) error {
return (<-v.GoDeleteIconFile(flags, make(chan *dbus.Call, 1), iconFile).Done).Err
}
// method EnableNoPasswdLogin
func (v *user) GoEnableNoPasswdLogin(flags dbus.Flags, ch chan *dbus.Call, enabled bool) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".EnableNoPasswdLogin", flags, ch, enabled)
}
func (v *user) EnableNoPasswdLogin(flags dbus.Flags, enabled bool) error {
return (<-v.GoEnableNoPasswdLogin(flags, make(chan *dbus.Call, 1), enabled).Done).Err
}
// method SetAutomaticLogin
func (v *user) GoSetAutomaticLogin(flags dbus.Flags, ch chan *dbus.Call, enabled bool) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetAutomaticLogin", flags, ch, enabled)
}
func (v *user) SetAutomaticLogin(flags dbus.Flags, enabled bool) error {
return (<-v.GoSetAutomaticLogin(flags, make(chan *dbus.Call, 1), enabled).Done).Err
}
// method SetDesktopBackgrounds
func (v *user) GoSetDesktopBackgrounds(flags dbus.Flags, ch chan *dbus.Call, backgrounds []string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetDesktopBackgrounds", flags, ch, backgrounds)
}
func (v *user) SetDesktopBackgrounds(flags dbus.Flags, backgrounds []string) error {
return (<-v.GoSetDesktopBackgrounds(flags, make(chan *dbus.Call, 1), backgrounds).Done).Err
}
// method SetFullName
func (v *user) GoSetFullName(flags dbus.Flags, ch chan *dbus.Call, name string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetFullName", flags, ch, name)
}
func (v *user) SetFullName(flags dbus.Flags, name string) error {
return (<-v.GoSetFullName(flags, make(chan *dbus.Call, 1), name).Done).Err
}
// method SetGreeterBackground
func (v *user) GoSetGreeterBackground(flags dbus.Flags, ch chan *dbus.Call, background string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetGreeterBackground", flags, ch, background)
}
func (v *user) SetGreeterBackground(flags dbus.Flags, background string) error {
return (<-v.GoSetGreeterBackground(flags, make(chan *dbus.Call, 1), background).Done).Err
}
// method SetCurrentWorkspace
func (v *user) GoSetCurrentWorkspace(flags dbus.Flags, ch chan *dbus.Call, currentWorkspace int32) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetCurrentWorkspace", flags, ch, currentWorkspace)
}
func (v *user) SetCurrentWorkspace(flags dbus.Flags, currentWorkspace int32) error {
return (<-v.GoSetCurrentWorkspace(flags, make(chan *dbus.Call, 1), currentWorkspace).Done).Err
}
// method SetHistoryLayout
func (v *user) GoSetHistoryLayout(flags dbus.Flags, ch chan *dbus.Call, layouts []string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetHistoryLayout", flags, ch, layouts)
}
func (v *user) SetHistoryLayout(flags dbus.Flags, layouts []string) error {
return (<-v.GoSetHistoryLayout(flags, make(chan *dbus.Call, 1), layouts).Done).Err
}
// method SetHomeDir
func (v *user) GoSetHomeDir(flags dbus.Flags, ch chan *dbus.Call, home string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetHomeDir", flags, ch, home)
}
func (v *user) SetHomeDir(flags dbus.Flags, home string) error {
return (<-v.GoSetHomeDir(flags, make(chan *dbus.Call, 1), home).Done).Err
}
// method SetIconFile
func (v *user) GoSetIconFile(flags dbus.Flags, ch chan *dbus.Call, iconFile string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetIconFile", flags, ch, iconFile)
}
func (v *user) SetIconFile(flags dbus.Flags, iconFile string) error {
return (<-v.GoSetIconFile(flags, make(chan *dbus.Call, 1), iconFile).Done).Err
}
// method SetLayout
func (v *user) GoSetLayout(flags dbus.Flags, ch chan *dbus.Call, layout string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetLayout", flags, ch, layout)
}
func (v *user) SetLayout(flags dbus.Flags, layout string) error {
return (<-v.GoSetLayout(flags, make(chan *dbus.Call, 1), layout).Done).Err
}
// method SetLocale
func (v *user) GoSetLocale(flags dbus.Flags, ch chan *dbus.Call, locale string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetLocale", flags, ch, locale)
}
func (v *user) SetLocale(flags dbus.Flags, locale string) error {
return (<-v.GoSetLocale(flags, make(chan *dbus.Call, 1), locale).Done).Err
}
// method SetLocked
func (v *user) GoSetLocked(flags dbus.Flags, ch chan *dbus.Call, locked bool) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetLocked", flags, ch, locked)
}
func (v *user) SetLocked(flags dbus.Flags, locked bool) error {
return (<-v.GoSetLocked(flags, make(chan *dbus.Call, 1), locked).Done).Err
}
// method SetPassword
func (v *user) GoSetPassword(flags dbus.Flags, ch chan *dbus.Call, password string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetPassword", flags, ch, password)
}
func (v *user) SetPassword(flags dbus.Flags, password string) error {
return (<-v.GoSetPassword(flags, make(chan *dbus.Call, 1), password).Done).Err
}
// method SetShell
func (v *user) GoSetShell(flags dbus.Flags, ch chan *dbus.Call, shell string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetShell", flags, ch, shell)
}
func (v *user) SetShell(flags dbus.Flags, shell string) error {
return (<-v.GoSetShell(flags, make(chan *dbus.Call, 1), shell).Done).Err
}
// method SetUse24HourFormat
func (v *user) GoSetUse24HourFormat(flags dbus.Flags, ch chan *dbus.Call, value bool) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetUse24HourFormat", flags, ch, value)
}
func (v *user) SetUse24HourFormat(flags dbus.Flags, value bool) error {
return (<-v.GoSetUse24HourFormat(flags, make(chan *dbus.Call, 1), value).Done).Err
}
// method SetWeekdayFormat
func (v *user) GoSetWeekdayFormat(flags dbus.Flags, ch chan *dbus.Call, value int32) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetWeekdayFormat", flags, ch, value)
}
func (v *user) SetWeekdayFormat(flags dbus.Flags, value int32) error {
return (<-v.GoSetWeekdayFormat(flags, make(chan *dbus.Call, 1), value).Done).Err
}
// method SetShortDateFormat
func (v *user) GoSetShortDateFormat(flags dbus.Flags, ch chan *dbus.Call, value int32) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetShortDateFormat", flags, ch, value)
}
func (v *user) SetShortDateFormat(flags dbus.Flags, value int32) error {
return (<-v.GoSetShortDateFormat(flags, make(chan *dbus.Call, 1), value).Done).Err
}
// method SetLongDateFormat
func (v *user) GoSetLongDateFormat(flags dbus.Flags, ch chan *dbus.Call, value int32) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetLongDateFormat", flags, ch, value)
}
func (v *user) SetLongDateFormat(flags dbus.Flags, value int32) error {
return (<-v.GoSetLongDateFormat(flags, make(chan *dbus.Call, 1), value).Done).Err
}
// method SetShortTimeFormat
func (v *user) GoSetShortTimeFormat(flags dbus.Flags, ch chan *dbus.Call, value int32) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetShortTimeFormat", flags, ch, value)
}
func (v *user) SetShortTimeFormat(flags dbus.Flags, value int32) error {
return (<-v.GoSetShortTimeFormat(flags, make(chan *dbus.Call, 1), value).Done).Err
}
// method SetLongTimeFormat
func (v *user) GoSetLongTimeFormat(flags dbus.Flags, ch chan *dbus.Call, value int32) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetLongTimeFormat", flags, ch, value)
}
func (v *user) SetLongTimeFormat(flags dbus.Flags, value int32) error {
return (<-v.GoSetLongTimeFormat(flags, make(chan *dbus.Call, 1), value).Done).Err
}
// method SetWeekBegins
func (v *user) GoSetWeekBegins(flags dbus.Flags, ch chan *dbus.Call, value int32) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetWeekBegins", flags, ch, value)
}
func (v *user) SetWeekBegins(flags dbus.Flags, value int32) error {
return (<-v.GoSetWeekBegins(flags, make(chan *dbus.Call, 1), value).Done).Err
}
// property HistoryLayout as
func (v *user) HistoryLayout() proxy.PropStringArray {
return proxy.PropStringArray{
Impl: v,
Name: "HistoryLayout",
}
}
// property Gid s
func (v *user) Gid() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "Gid",
}
}
// property Groups as
func (v *user) Groups() proxy.PropStringArray {
return proxy.PropStringArray{
Impl: v,
Name: "Groups",
}
}
// property XSession s
func (v *user) XSession() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "XSession",
}
}
// property PasswordStatus s
func (v *user) PasswordStatus() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "PasswordStatus",
}
}
// property LoginTime t
func (v *user) LoginTime() proxy.PropUint64 {
return proxy.PropUint64{
Impl: v,
Name: "LoginTime",
}
}
// property GreeterBackground s
func (v *user) GreeterBackground() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "GreeterBackground",
}
}
// property CreatedTime t
func (v *user) CreatedTime() proxy.PropUint64 {
return proxy.PropUint64{
Impl: v,
Name: "CreatedTime",
}
}
// property UserName s
func (v *user) UserName() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "UserName",
}
}
// property Shell s
func (v *user) Shell() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "Shell",
}
}
// property Layout s
func (v *user) Layout() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "Layout",
}
}
// property IconFile s
func (v *user) IconFile() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "IconFile",
}
}
// property Use24HourFormat b
func (v *user) Use24HourFormat() proxy.PropBool {
return proxy.PropBool{
Impl: v,
Name: "Use24HourFormat",
}
}
// property AccountType i
func (v *user) AccountType() proxy.PropInt32 {
return proxy.PropInt32{
Impl: v,
Name: "AccountType",
}
}
// property HomeDir s
func (v *user) HomeDir() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "HomeDir",
}
}
// property Locale s
func (v *user) Locale() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "Locale",
}
}
// property DesktopBackgrounds as
func (v *user) DesktopBackgrounds() proxy.PropStringArray {
return proxy.PropStringArray{
Impl: v,
Name: "DesktopBackgrounds",
}
}
// property Locked b
func (v *user) Locked() proxy.PropBool {
return proxy.PropBool{
Impl: v,
Name: "Locked",
}
}
// property NoPasswdLogin b
func (v *user) NoPasswdLogin() proxy.PropBool {
return proxy.PropBool{
Impl: v,
Name: "NoPasswdLogin",
}
}
// property IconList as
func (v *user) IconList() proxy.PropStringArray {
return proxy.PropStringArray{
Impl: v,
Name: "IconList",
}
}
// property UUID s
func (v *user) UUID() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "UUID",
}
}
// property FullName s
func (v *user) FullName() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "FullName",
}
}
// property Uid s
func (v *user) Uid() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "Uid",
}
}
// property AutomaticLogin b
func (v *user) AutomaticLogin() proxy.PropBool {
return proxy.PropBool{
Impl: v,
Name: "AutomaticLogin",
}
}
// property SystemAccount b
func (v *user) SystemAccount() proxy.PropBool {
return proxy.PropBool{
Impl: v,
Name: "SystemAccount",
}
}
// property WeekdayFormat i
func (v *user) WeekdayFormat() proxy.PropInt32 {
return proxy.PropInt32{
Impl: v,
Name: "WeekdayFormat",
}
}
// property ShortDateFormat i
func (v *user) ShortDateFormat() proxy.PropInt32 {
return proxy.PropInt32{
Impl: v,
Name: "ShortDateFormat",
}
}
// property LongDateFormat i
func (v *user) LongDateFormat() proxy.PropInt32 {
return proxy.PropInt32{
Impl: v,
Name: "LongDateFormat",
}
}
// property ShortTimeFormat i
func (v *user) ShortTimeFormat() proxy.PropInt32 {
return proxy.PropInt32{
Impl: v,
Name: "ShortTimeFormat",
}
}
// property LongTimeFormat i
func (v *user) LongTimeFormat() proxy.PropInt32 {
return proxy.PropInt32{
Impl: v,
Name: "LongTimeFormat",
}
}
// property WeekBegins i
func (v *user) WeekBegins() proxy.PropInt32 {
return proxy.PropInt32{
Impl: v,
Name: "WeekBegins",
}
}
type ImageBlur struct {
imageBlur // interface com.deepin.daemon.ImageBlur
proxy.Object
}
func NewImageBlur(conn *dbus.Conn) *ImageBlur {
obj := new(ImageBlur)
obj.Object.Init_(conn, "com.deepin.daemon.Accounts", "/com/deepin/daemon/ImageBlur")
return obj
}
type imageBlur struct{}
func (v *imageBlur) GetObject_() *proxy.Object {
return (*proxy.Object)(unsafe.Pointer(v))
}
func (*imageBlur) GetInterfaceName_() string {
return "com.deepin.daemon.ImageBlur"
}
// method Delete
func (v *imageBlur) GoDelete(flags dbus.Flags, ch chan *dbus.Call, file string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".Delete", flags, ch, file)
}
func (v *imageBlur) Delete(flags dbus.Flags, file string) error {
return (<-v.GoDelete(flags, make(chan *dbus.Call, 1), file).Done).Err
}
// method Get
func (v *imageBlur) GoGet(flags dbus.Flags, ch chan *dbus.Call, source string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".Get", flags, ch, source)
}
func (*imageBlur) StoreGet(call *dbus.Call) (blurred string, err error) {
err = call.Store(&blurred)
return
}
func (v *imageBlur) Get(flags dbus.Flags, source string) (blurred string, err error) {
return v.StoreGet(
<-v.GoGet(flags, make(chan *dbus.Call, 1), source).Done)
}
// signal BlurDone
func (v *imageBlur) ConnectBlurDone(cb func(imgFile string, imgBlurFile string, ok bool)) (dbusutil.SignalHandlerId, error) {
if cb == nil {
return 0, errors.New("nil callback")
}
obj := v.GetObject_()
rule := fmt.Sprintf(
"type='signal',interface='%s',member='%s',path='%s',sender='%s'",
v.GetInterfaceName_(), "BlurDone", obj.Path_(), obj.ServiceName_())
sigRule := &dbusutil.SignalRule{
Path: obj.Path_(),
Name: v.GetInterfaceName_() + ".BlurDone",
}
handlerFunc := func(sig *dbus.Signal) {
var imgFile string
var imgBlurFile string
var ok bool
err := dbus.Store(sig.Body, &imgFile, &imgBlurFile, &ok)
if err == nil {
cb(imgFile, imgBlurFile, ok)
}
}
return obj.ConnectSignal_(rule, sigRule, handlerFunc)
}
|