2 * This file is part of Sharing Application Library
4 * Copyright (C) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
6 * Contact: Alexander Bokovoy <alexander.bokovoy@nokia.com>
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.
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.
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
24 #ifndef _SHARING_ACCOUNT_H_
25 #define _SHARING_ACCOUNT_H_
28 #include "sharing-service.h"
32 typedef struct SharingAccount SharingAccount;
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);
42 * sharing_account_set_username:
43 * @self: Used #SharingAccount.
44 * @value: Username to set.
46 * Macro for setting the username to account.
48 #define sharing_account_set_username(self,value) \
49 sharing_account_set_param(self, "username", value)
51 * sharing_account_get_username:
52 * @self: Used #SharingAccount.
54 * Macro for getting the username from account.
56 * Returns: Username as gchar*.
58 #define sharing_account_get_username(self) \
59 sharing_account_get_param(self, "username")
61 * sharing_account_set_password:
62 * @self: Used #SharingAccount.
63 * @value: Password to set.
65 * Macro for setting the password to account.
67 #define sharing_account_set_password(self,value) \
68 sharing_account_set_param(self, "password", value)
70 * sharing_account_get_password:
71 * self: Used #SharingAccount.
73 * Macro for getting the username from account.
75 * Returns: Password as gchar*
77 #define sharing_account_get_password(self) \
78 sharing_account_get_param(self, "password")
83 #endif /* #ifndef _SHARING_ACCOUNT_H_ */