Moo
mooprojects.h
Go to the documentation of this file.
1 
4 
5 #ifndef __mooprojects__
6 #define __mooprojects__
7 
8 #include "mooplatform.h"
9 #include "mooproject.h"
10 
11 //-----------------------------------------------------------------------------
13 class MooProjects;
23 typedef void (*mooProjectsCallback) (MooProjects* projects, mooInt operation, mooInt result, mooInt id, void* reference);
24 
29 
30 //-----------------------------------------------------------------------------
32 {
33 public:
34  MooProjects () {}
35  virtual ~MooProjects () {}
36 
38 
47  virtual MooProject** getProjects (mooInt& count) = 0;
48 
50  virtual MooProject* getProject (mooUInt id) = 0;
51 
53 
58  virtual mooUInt createProject (const mooChar* projectName) = 0;
59 
61 
69  virtual mooInt openProject (mooUInt id) = 0;
70 
72  virtual void closeProject () = 0;
73 
75 
84  virtual void syncProject () = 0;
85 
87  virtual mooUInt getActiveProjectID () = 0;
88 
90 
93  virtual void setCallback (mooProjectsCallback callback, void* reference) = 0;
94 
96  enum
97  {
98  kProjectsChanged = 3000,
99 
100  // all of the following will provide an id
101  kProjectChanged,
102  kProjectAdded,
103  kProjectRemoved,
104  kProjectOpened,
105  kProjectClosed,
107  kProjectTrackAdded,
108  kProjectTrackRemoved,
109  kProjectClipAdded,
110  kProjectClipRemoved,
112 
115  kMooProjectsErrorNotAmember,
116  kMooProjectsErrorProjectNotFound
117  };
118 };
119 
120 #endif
unsigned short mooChar
Definition: mooplatform.h:35
virtual void setCallback(mooProjectsCallback callback, void *reference)=0
the reference parameter passed to setCallback is passed to the callback for your own use...
virtual mooInt openProject(mooUInt id)=0
open a project. The callback will be notified whenever changes to a successfully opened project are b...
virtual void closeProject()=0
close the currently opened project
virtual void syncProject()=0
sync with cloud
Container and management of MooProject
Definition: mooprojects.h:31
__int64 mooInt
All signed ints are 64 bit wide.
Definition: mooplatform.h:41
sync completed
Definition: mooprojects.h:106
unsigned __int64 mooUInt
All unsigned ints are 64 bit wide.
Definition: mooplatform.h:50
void(* mooProjectsCallback)(MooProjects *projects, mooInt operation, mooInt result, mooInt id, void *reference)
Definition: mooprojects.h:23
virtual mooUInt createProject(const mooChar *projectName)=0
create a project. The callback will be notified whenever changes to a successfully opened project are...
virtual mooUInt getActiveProjectID()=0
get the currently opened project. if none is open, 0 is returned
error codes passed to callback
Definition: mooprojects.h:114
with project member id, result is message ID, see MooProject getMessage ()
Definition: mooprojects.h:111
A Moo Project
Definition: mooproject.h:18
virtual MooProject ** getProjects(mooInt &count)=0
obtain a list of all projects that the currently logged in user is part of.
virtual MooProject * getProject(mooUInt id)=0
get a specific project by id