Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Commit

Permalink
comment more methods
Browse files Browse the repository at this point in the history
  • Loading branch information
James Cline committed Apr 16, 2012
1 parent 0bb8296 commit ac9f3f3
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/database/fs.py
Expand Up @@ -700,6 +700,19 @@ def renamePhoto(self, photo, name):


def movePhoto(self, photo, photoset):
"""
Moves a photo from one photoset to another.
Arguments:
photo: The photo object we want to move.
toPhotoset: The photoset we want to move the photo to.
Returns:
N/A
Throws:
?
"""
name = photo.name
fromPath = self.generatePhotosetDir(photo.photoset) + "/" + name
toPath = self.generatePhotosetDir(photoset) + "/" + name
Expand Down
38 changes: 38 additions & 0 deletions src/database/photostorage.py
Expand Up @@ -22,11 +22,49 @@ def __init__(self, dbm, fsm):
self.fsm = fsm

def getPhotoData(self, photo):
"""
Loads the photo image data.
Arguments:
photo: The photo object who's data we want.
Returns:
The image data of the photo.
Throws:
?
"""
return self.fsm.getPhoto(photo)

def renamePhoto(self, photo, toName):
"""
Renames a photo's file.
Arguments:
photo: The photo object we want to rename.
name: The new name for the photo.
Return:
N/A
Throws:
?
"""
self.fsm.renamePhoto(photo, toName)

def movePhoto(self, photo, toPhotoset):
"""
Moves a photo from one photoset to another.
Arguments:
photo: The photo object we want to move.
toPhotoset: The photoset we want to move the photo to.
Returns:
N/A
Throws:
?
"""
self.fsm.movePhoto(photo, toPhotoset)

0 comments on commit ac9f3f3

Please sign in to comment.