Permalink
Browse files

Added submission_clone().

  • Loading branch information...
1 parent 10280d5 commit d2dab1ef64f367ce283e980fcb07dc511e1eb611 Tilman Sauerbeck committed Nov 22, 2009
Showing with 12 additions and 0 deletions.
  1. +11 −0 src/submission.c
  2. +1 −0 src/submission.h
View
@@ -187,6 +187,17 @@ profile_submission_new (xmmsv_t *dict, uint32_t seconds_played,
return submission_new (sb, SUBMISSION_TYPE_PROFILE);
}
+Submission *
+submission_clone (Submission *s)
+{
+ StrBuf *sb;
+
+ sb = strbuf_new ();
+ strbuf_append (sb, s->sb->buf);
+
+ return submission_new (sb, s->type);
+}
+
void
submission_free (Submission *s)
{
View
@@ -42,6 +42,7 @@ typedef struct {
Submission *submission_new (StrBuf *sb, SubmissionType type);
Submission *now_playing_submission_new (xmmsv_t *dict);
Submission *profile_submission_new (xmmsv_t *dict, uint32_t seconds_played, time_t started_playing);
+Submission *submission_clone (Submission *s);
void submission_free (Submission *s);
#endif

0 comments on commit d2dab1e

Please sign in to comment.