nnsdk/nn/
friends.rs

1#[allow(unused_imports)]
2use self::super::root;
3pub type Url = [u8; 160usize];
4extern "C" {
5    #[link_name = "\u{1}_ZN2nn7friends10InitializeEv"]
6    pub fn Initialize();
7}
8extern "C" {
9    #[link_name = "\u{1}_ZN2nn7friends14GetProfileListEPNS0_12AsyncContextEPNS0_7ProfileERKNS_7account3UidEPKmi"]
10    pub fn GetProfileList(
11        context: *mut AsyncContext,
12        profiles: *mut Profile,
13        userID: *const root::nn::account::Uid,
14        accountIDs: *const root::nn::account::NetworkServiceAccountId,
15        numAccounts: root::s32,
16    ) -> root::Result;
17}
18#[repr(C)]
19#[derive(Debug, Copy, Clone)]
20pub struct Profile {
21    pub _address: u8,
22}
23
24extern "C" {
25    #[link_name = "\u{1}_ZNK2nn7friends7Profile12GetAccountIdEv"]
26    pub fn Profile_GetAccountId(
27        this: *const Profile,
28    ) -> root::nn::account::NetworkServiceAccountId;
29}
30extern "C" {
31    #[link_name = "\u{1}_ZNK2nn7friends7Profile11GetNicknameEv"]
32    pub fn Profile_GetNickname(
33        this: *const Profile,
34    ) -> *mut root::nn::account::Nickname;
35}
36extern "C" {
37    #[link_name = "\u{1}_ZNK2nn7friends7Profile7IsValidEv"]
38    pub fn Profile_IsValid(this: *const Profile) -> bool;
39}
40extern "C" {
41    #[link_name = "\u{1}_ZN2nn7friends7Profile18GetProfileImageUrlEPA160_ci"]
42    pub fn Profile_GetProfileImageUrl(
43        this: *mut Profile,
44        arg1: *mut Url,
45        arg2: root::s32,
46    ) -> root::Result;
47}
48extern "C" {
49    #[link_name = "\u{1}_ZN2nn7friends7ProfileC1Ev"]
50    pub fn Profile_Profile(this: *mut Profile);
51}
52impl Profile {
53    #[inline]
54    pub unsafe fn GetAccountId(&self) -> root::nn::account::NetworkServiceAccountId {
55        Profile_GetAccountId(self)
56    }
57    #[inline]
58    pub unsafe fn GetNickname(&self) -> *mut root::nn::account::Nickname {
59        Profile_GetNickname(self)
60    }
61    #[inline]
62    pub unsafe fn IsValid(&self) -> bool {
63        Profile_IsValid(self)
64    }
65    #[inline]
66    pub unsafe fn GetProfileImageUrl(
67        &mut self,
68        arg1: *mut Url,
69        arg2: root::s32,
70    ) -> root::Result {
71        Profile_GetProfileImageUrl(self, arg1, arg2)
72    }
73    #[inline]
74    pub unsafe fn new() -> Self {
75        let mut __bindgen_tmp = ::core::mem::MaybeUninit::uninit();
76        Profile_Profile(__bindgen_tmp.as_mut_ptr());
77        __bindgen_tmp.assume_init()
78    }
79}
80#[repr(C)]
81#[derive(Debug)]
82pub struct AsyncContext {
83    pub _address: u8,
84}
85
86extern "C" {
87    #[link_name = "\u{1}_ZN2nn7friends12AsyncContext14GetSystemEventEPNS_2os11SystemEventE"]
88    pub fn AsyncContext_GetSystemEvent(
89        this: *mut AsyncContext,
90        arg1: *mut root::nn::os::SystemEvent,
91    ) -> root::Result;
92}
93extern "C" {
94    #[link_name = "\u{1}_ZNK2nn7friends12AsyncContext9GetResultEv"]
95    pub fn AsyncContext_GetResult(
96        this: *const AsyncContext,
97    ) -> root::Result;
98}
99extern "C" {
100    #[link_name = "\u{1}_ZN2nn7friends12AsyncContextC1Ev"]
101    pub fn AsyncContext_AsyncContext(this: *mut AsyncContext);
102}
103extern "C" {
104    #[link_name = "\u{1}_ZN2nn7friends12AsyncContextD1Ev"]
105    pub fn AsyncContext_AsyncContext_destructor(
106        this: *mut AsyncContext,
107    );
108}
109impl AsyncContext {
110    #[inline]
111    pub unsafe fn GetSystemEvent(
112        &mut self,
113        arg1: *mut root::nn::os::SystemEvent,
114    ) -> root::Result {
115        AsyncContext_GetSystemEvent(self, arg1)
116    }
117    #[inline]
118    pub unsafe fn GetResult(&self) -> root::Result {
119        AsyncContext_GetResult(self)
120    }
121    #[inline]
122    pub unsafe fn new() -> Self {
123        let mut __bindgen_tmp = ::core::mem::MaybeUninit::uninit();
124        AsyncContext_AsyncContext(__bindgen_tmp.as_mut_ptr());
125        __bindgen_tmp.assume_init()
126    }
127    #[inline]
128    pub unsafe fn destruct(&mut self) {
129        AsyncContext_AsyncContext_destructor(self)
130    }
131}