Package caldavclientlibrary :: Package client :: Module account
[hide private]
[frames] | no frames]

Source Code for Module caldavclientlibrary.client.account

 1  ## 
 2  # Copyright (c) 2006-2016 Apple Inc. All rights reserved. 
 3  # 
 4  # Licensed under the Apache License, Version 2.0 (the "License"); 
 5  # you may not use this file except in compliance with the License. 
 6  # You may obtain a copy of the License at 
 7  # 
 8  # http://www.apache.org/licenses/LICENSE-2.0 
 9  # 
10  # Unless required by applicable law or agreed to in writing, software 
11  # distributed under the License is distributed on an "AS IS" BASIS, 
12  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
13  # See the License for the specific language governing permissions and 
14  # limitations under the License. 
15  ## 
16   
17  from caldavclientlibrary.client.clientsession import CalDAVSession 
18  from caldavclientlibrary.client.principal import principalCache 
19   
20 -class CalDAVAccount(object):
21
22 - def __init__(self, server, port=None, ssl=False, user="", pswd="", principal=None, root=None, logging=False):
25
26 - def setUserPswd(self, user, pswd):
29
30 - def getPrincipal(self, path=None, refresh=False):
31 if path: 32 return principalCache.getPrincipal(self.session, path, refresh=refresh) 33 elif refresh: 34 self.principal = principalCache.getPrincipal(self.session, self.session.principalPath, refresh=refresh) 35 36 return self.principal
37