You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
241 lines
7.9 KiB
241 lines
7.9 KiB
1 year ago
|
/************************************************************************
|
||
|
|
||
|
Copyright (c) 2005-2011 by Juphoon System Software, Inc.
|
||
|
All rights reserved.
|
||
|
|
||
|
This software is confidential and proprietary to Juphoon System,
|
||
|
Inc. No part of this software may be reproduced, stored, transmitted,
|
||
|
disclosed or used in any form or by any means other than as expressly
|
||
|
provided by the written license agreement between Juphoon and its
|
||
|
licensee.
|
||
|
|
||
|
THIS SOFTWARE IS PROVIDED BY JUPHOON "AS IS" AND ANY EXPRESS OR
|
||
|
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||
|
ARE DISCLAIMED. IN NO EVENT SHALL JUPHOON BE LIABLE FOR ANY DIRECT,
|
||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||
|
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||
|
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||
|
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||
|
POSSIBILITY OF SUCH DAMAGE.
|
||
|
|
||
|
Juphoon System Software, Inc.
|
||
|
Email: support@juphoon.com
|
||
|
Web: http://www.juphoon.com
|
||
|
|
||
|
************************************************************************/
|
||
|
/*************************************************
|
||
|
File name : mtc_fs.h
|
||
|
Module : rich session enabler
|
||
|
Author : bob.liu
|
||
|
Created on : 2015-06-17
|
||
|
Description :
|
||
|
Data structure and function declare required by mtc conference
|
||
|
|
||
|
Modify History:
|
||
|
1. Date: Author: Modification:
|
||
|
*************************************************/
|
||
|
#ifndef _MTC_FS2_H__
|
||
|
#define _MTC_FS2_H__
|
||
|
|
||
|
#include "mtc_def.h"
|
||
|
|
||
|
/**
|
||
|
* @file
|
||
|
* @brief MTC File Storage Interfaces
|
||
|
*
|
||
|
* This file includes file storage interface function.
|
||
|
*/
|
||
|
#ifdef __cplusplus
|
||
|
EXPORT_FLAG {
|
||
|
#endif
|
||
|
|
||
|
/**
|
||
|
* @defgroup MtcFsNotification MTC notification of file storage event.
|
||
|
* @{
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* @brief Posted when upload file successfully.
|
||
|
*
|
||
|
* The pcInfo of this notification contains @ref MtcFsLinkUriKey
|
||
|
* @ref MtcFsFileSizeKey.
|
||
|
*/
|
||
|
#define MtcFs2UploadOkNotification "MtcFs2UploadOkNotification"
|
||
|
|
||
|
/**
|
||
|
* @brief Posted when failed to upload file.
|
||
|
*
|
||
|
* The pcInfo of this notification is ZNULL.
|
||
|
*/
|
||
|
#define MtcFs2UploadDidFailNotification "MtcFs2UploadDidFailNotification"
|
||
|
|
||
|
/**
|
||
|
* @brief Posted when download file successfully.
|
||
|
*
|
||
|
* The pcInfo of this notification contains @ref MtcFsLinkUriKey.
|
||
|
*/
|
||
|
#define MtcFs2DownloadOkNotification "MtcFs2DownloadOkNotification"
|
||
|
|
||
|
/**
|
||
|
* @brief Posted when failed to download file.
|
||
|
*
|
||
|
* The pcInfo of this notification is ZNULL.
|
||
|
*/
|
||
|
#define MtcFs2DownloadDidFailNotification "MtcFs2DownloadDidFailNotification"
|
||
|
|
||
|
/**
|
||
|
* @brief Posted when remove file successfully.
|
||
|
*
|
||
|
* The pcInfo of this notification contains @ref MtcFsLinkUriKey.
|
||
|
*/
|
||
|
#define MtcFs2RemoveOkNotification "MtcFs2RemoveOkNotification"
|
||
|
|
||
|
/**
|
||
|
* @brief Posted when failed to remove file.
|
||
|
*
|
||
|
* The pcInfo of this notification is ZNULL.
|
||
|
*/
|
||
|
#define MtcFs2RemoveDidFailNotification "MtcFs2RemoveDidFailNotification"
|
||
|
|
||
|
/**
|
||
|
* @brief Posted while uploading file(s).
|
||
|
*
|
||
|
* The pcInfo of this notification contains @ref MtcFsLocalFilePathKey @MtcFsProgressKey.
|
||
|
*/
|
||
|
#define MtcFs2UploadProgressNotification "MtcFs2UploadProgressNotification"
|
||
|
|
||
|
/**
|
||
|
* @brief Posted while downloading file(s).
|
||
|
*
|
||
|
* The pcInfo of this notification contains @ref MtcFsLinkUriKey @MtcFsProgressKey.
|
||
|
*/
|
||
|
#define MtcFs2DownloadProgressNotification "MtcFs2DownloadProgressNotification"
|
||
|
|
||
|
/**
|
||
|
* @brief Posted when cancel upload successfully.
|
||
|
*
|
||
|
* The pcInfo of this notification contains
|
||
|
* @ref MtcFsLocalFilePathKey, @ref MtcFsLinkUriKey.
|
||
|
*/
|
||
|
#define MtcFs2CancelUploadOkNotification "MtcFs2CancalUploadOkNotification"
|
||
|
|
||
|
/**
|
||
|
* @brief Posted when failed to cancel upload file.
|
||
|
*
|
||
|
* The pcInfo of this notification is ZNULL.
|
||
|
*/
|
||
|
#define MtcFs2CancelUploadDidFailNotification "MtcFs2CancelUploadDidFailNotification"
|
||
|
|
||
|
/**
|
||
|
* @brief Posted when cancel download successfully.
|
||
|
*
|
||
|
* The pcInfo of this notification contains
|
||
|
* @ref MtcFsLinkUriKey.
|
||
|
*/
|
||
|
#define MtcFs2CancelDownloadOkNotification "MtcFs2CancelDownloadOkNotification"
|
||
|
|
||
|
/**
|
||
|
* @brief Posted when failed to cancel download file.
|
||
|
*
|
||
|
* The pcInfo of this notification is ZNULL.
|
||
|
*/
|
||
|
#define MtcFs2CancelDownloadDidFailNotification "MtcFs2CancelDownloadDidFailNotification"
|
||
|
|
||
|
/**
|
||
|
* @}
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* @brief Upload a file.
|
||
|
*
|
||
|
* When the file has been sent successfully, @ref MtcFs2UploadOkNotification will
|
||
|
* be reported.
|
||
|
* When failed to send the file, @ref MtcFs2UploadDidFailNotification will be reported.
|
||
|
*
|
||
|
* @param zCookie User defined value.
|
||
|
* @param pcToId User id or group id the file send to.
|
||
|
* @param pcFilePath Local file path.
|
||
|
* @param iExpireSecond Vailed time of the file on server.
|
||
|
* @retval ZOK The request has been sent successfully.
|
||
|
* @retval ZFAILED Failed to send the request.
|
||
|
*/
|
||
|
MTCFUNC ZINT Mtc_Fs2Upload(ZCOOKIE zCookie, ZCONST ZCHAR *pcToId,
|
||
|
ZCONST ZCHAR *pcFilePath, ZINT64 qwExpireSecond);
|
||
|
|
||
|
/**
|
||
|
* @brief Download a file from server.
|
||
|
*
|
||
|
* When recv the file successfully, @ref MtcFs2DownloadOkNotification will
|
||
|
* be reported.
|
||
|
* When failed to recv the file, @ref MtcFs2DownloadDidFailNotification will be reported.
|
||
|
*
|
||
|
* @param zCookie User defined value.
|
||
|
* @param pcUri File path on server.
|
||
|
* @param pcFilePath Local file path to save the file.
|
||
|
* @param qwSize File size.
|
||
|
* @retval ZOK The request has been sent successfully.
|
||
|
* @retval ZFAILED Failed to send the request.
|
||
|
*/
|
||
|
MTCFUNC ZINT Mtc_Fs2Download(ZCOOKIE zCookie, ZCONST ZCHAR *pcUri,
|
||
|
ZCONST ZCHAR *pcFilePath, ZINT64 qwSize);
|
||
|
|
||
|
/**
|
||
|
* @brief Remove a file from server.
|
||
|
*
|
||
|
* @param zCookie User defined value.
|
||
|
* @param pcUri File path on server.
|
||
|
*/
|
||
|
MTCFUNC ZINT Mtc_Fs2Remove(ZCOOKIE zCookie, ZCONST ZCHAR *pcUri);
|
||
|
|
||
|
/**
|
||
|
* @brief Cancel upload a file.
|
||
|
*
|
||
|
* When cancal upload the file successfully, @ref MtcFs2CancelUploadOkNotification will
|
||
|
* be reported.
|
||
|
* When failed to cancal upload the file, @ref MtcFs2CancelUploadDidFailNotification will be reported.
|
||
|
*
|
||
|
* @param zCookie User defined value.
|
||
|
* @param pcFilePath Local file path.
|
||
|
* @retval ZOK The request has been sent successfully.
|
||
|
* @retval ZFAILED Failed to send the request.
|
||
|
*/
|
||
|
MTCFUNC ZINT Mtc_Fs2CancelUpload(ZCOOKIE zCookie, ZCONST ZCHAR *pcFilePath);
|
||
|
|
||
|
/**
|
||
|
* @brief resume upload a file.
|
||
|
*
|
||
|
* When upload the file successfully, @ref MtcFs2UploadOkNotification will
|
||
|
* be reported.
|
||
|
* When failed to upload the file, @ref MtcFs2UploadDidFailNotification will be reported.
|
||
|
*
|
||
|
* @param zCookie User defined value.
|
||
|
* @param pcFilePath Local file path.
|
||
|
* @param pcServerPath File path on server.
|
||
|
* @retval ZOK The request has been sent successfully.
|
||
|
* @retval ZFAILED Failed to send the request.
|
||
|
*/
|
||
|
MTCFUNC ZINT Mtc_Fs2ResumeUpload(ZCOOKIE zCookie, ZCONST ZCHAR *pcFilePath, ZCONST ZCHAR *pcServerPath);
|
||
|
|
||
|
/**
|
||
|
* @brief Cancel download a file.
|
||
|
*
|
||
|
* When cancal download the file successfully, @ref MtcFs2CancelDownloadOkNotification will
|
||
|
* be reported.
|
||
|
* When failed to cancal upload the file, @ref MtcFs2CancelDownloadDidFailNotification will be reported.
|
||
|
*
|
||
|
* @param zCookie User defined value.
|
||
|
* @param pcServerPath File Path on server.
|
||
|
* @retval ZOK The request has been sent successfully.
|
||
|
* @retval ZFAILED Failed to send the request.
|
||
|
*/
|
||
|
MTCFUNC ZINT Mtc_Fs2CancelDownload(ZCOOKIE zCookie, ZCONST ZCHAR *pcServerPath);
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#endif /* _MTC_FS2_H__ */
|