v0.2.2 release
[yandexfotkisp] / src / libsharing / sharing-account.h
1 /*
2  * This file is part of Sharing Application Library
3  *
4  * Copyright (C) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
5  *
6  * Contact: Alexander Bokovoy <alexander.bokovoy@nokia.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * version 2.1 as published by the Free Software Foundation.
11  *
12  * This library is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA
21  *
22  */
23
24 #ifndef _SHARING_ACCOUNT_H_
25 #define _SHARING_ACCOUNT_H_
26
27 #include <glib.h>
28 #include "sharing-service.h"
29
30 G_BEGIN_DECLS
31
32 typedef struct SharingAccount SharingAccount;
33
34 void sharing_account_free (SharingAccount* self);
35 gboolean sharing_account_set_param (const SharingAccount* self,
36     const gchar* key, const gchar* value);
37 gchar* sharing_account_get_param (const SharingAccount* self, const gchar* key);
38 gboolean sharing_account_set_option_values (const SharingAccount* self,
39     const gchar* key, const GSList * values);
40
41 /**
42  * sharing_account_set_username:
43  * @self: Used #SharingAccount.
44  * @value: Username to set.
45  *
46  * Macro for setting the username to account.
47  */
48 #define sharing_account_set_username(self,value) \
49     sharing_account_set_param(self, "username", value)
50 /**
51  * sharing_account_get_username:
52  * @self: Used #SharingAccount.
53  *
54  * Macro for getting the username from account.
55  *
56  * Returns: Username as gchar*.
57  */
58 #define sharing_account_get_username(self) \
59     sharing_account_get_param(self, "username")
60 /**
61  * sharing_account_set_password:
62  * @self: Used #SharingAccount.
63  * @value: Password to set.
64  *
65  * Macro for setting the password to account.
66  */
67 #define sharing_account_set_password(self,value) \
68     sharing_account_set_param(self, "password", value)
69 /**
70  * sharing_account_get_password:
71  * self: Used #SharingAccount.
72  *
73  * Macro for getting the username from account.
74  *
75  * Returns: Password as gchar*
76  */
77 #define sharing_account_get_password(self) \
78     sharing_account_get_param(self, "password") 
79
80
81 G_END_DECLS
82
83 #endif /* #ifndef _SHARING_ACCOUNT_H_ */