Permalink
Browse files

comment more methods

  • Loading branch information...
1 parent 0bb8296 commit ac9f3f342fa2f948908bec1f94349a2924698418 @jcline jcline committed Apr 16, 2012
Showing with 51 additions and 0 deletions.
  1. +13 −0 src/database/fs.py
  2. +38 −0 src/database/photostorage.py
View
@@ -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
@@ -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.