[vlmc-devel] commit: Common header file for YouTube services (Rohit Yadav )
git at videolan.org
git at videolan.org
Tue Aug 24 11:11:18 CEST 2010
vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Mon Aug 23 22:14:30 2010 +0530| [27cc67da2a197bf614d14b803ef770d8f971a214] | committer: Hugo Beauzée-Luyssen
Common header file for YouTube services
Signed-off-by: Hugo Beauzée-Luyssen <beauze.h at gmail.com>
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=27cc67da2a197bf614d14b803ef770d8f971a214
---
src/Services/YouTube/YouTubeCommon.h | 76 ++++++++++++++++++++++++++++++++++
1 files changed, 76 insertions(+), 0 deletions(-)
diff --git a/src/Services/YouTube/YouTubeCommon.h b/src/Services/YouTube/YouTubeCommon.h
new file mode 100644
index 0000000..5191e61
--- /dev/null
+++ b/src/Services/YouTube/YouTubeCommon.h
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * YouTubeCommon.h: Generic Video Data Structs etc. for YouTube
+ *****************************************************************************
+ * Copyright (C) 2010 VideoLAN
+ *
+ * Authors: Rohit Yadav <rohityadav89 AT gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef YOUTUBECOMMON_H
+#define YOUTUBECOMMON_H
+
+#include <QString>
+
+/* VideoData structure used throught YouTube Service to pass video meta data */
+struct VideoData
+{
+ QString title;
+ QString category;
+ QString description;
+ QString keywords;
+ bool isPrivate;
+};
+
+/* Status codes for YouTubeService */
+enum YouTubeServiceState
+{
+ AuthStart = 0,
+ AuthFinish,
+ UploadStart,
+ UploadFinish,
+ SearchStart,
+ SearchFinish
+};
+
+/* Error Code References:
+ * Auth:
+ * http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html#Errors
+ */
+
+/* Error codes for YouTubeService */
+enum YouTubeError
+{
+ Ok = 0,
+ Abort, // Service was aborted
+
+ BadAuthentication, // Incorrect User credentials
+ CaptchaRequired, // If server is trying to challenge captcha
+ ServiceUnavailable, // YT Service Unavailable
+ UnknownError, // Unknown Error
+
+ NetworkError, // Some Network Error
+ ConnectionError, // Connection error
+ ContentError, // Remote Content error on server
+ SSLError, // SSL Error
+ ProxyError, // Proxy Error
+ ProxyAuthError, // Proxy Authentication Error
+
+ FileMissing, // File not file
+ XmlError // XML Parsing Error
+};
+
+#endif // YOUTUBECOMMON_H
More information about the Vlmc-devel
mailing list