#include <lib_browser.h>
详细描述
Plugin interface for content node plugins.
SDKBrowserOperation
|
enum
|
{
CheckOperation
,
PrepareOperation
,
PerformOperation
,
ModeMask
,
ModePrivateFlag1
,
ModePrivateFlag2
,
ModePrivateFlag3
,
ModePrivateFlag4
,
ModePrivateFlag5
,
ModePrivateFlag6
,
ModePrivateFlag7
}
|
SDKBrowserOperationResult
|
enum
|
{
OperationSuccessful
,
RenameNotPermitted
,
MoveNotPermitted
,
CopyNotPermitted
,
DeleteNotPermitted
,
NewFolderNotPermitted
,
RenameError
,
MoveError
,
CopyError
,
DeleteError
,
UnsupportedNodeType
,
UserCancelled
}
|
Move/Copy/Delete
|
virtual
Int32
|
MoveFrom
(
SDKBrowserContentNodeRef
new_child,
Int32
模式,
CopyMoveCallback
*callback, void *private_data,
BaseThread
*thread)
|
virtual
Int32
|
CopyFrom
(
SDKBrowserContentNodeRef
new_child,
Int32
mode, const
String
*rename,
CopyMoveCallback
*callback, void *private_data,
BaseThread
*thread)
|
virtual
Int32
|
删除
(
Int32
模式,
CopyMoveCallback
*callback, void *private_data,
BaseThread
*thread)
|
Member Enumeration Documentation
◆
anonymous enum
Enumerator
|
CheckOperation
|
Check if the node (and its children) can be moved/copied/deleted (to the requested destination).
|
PrepareOperation
|
Collect information about the number of items and their size.
|
PerformOperation
|
Perform the move/copy/delete operation.
|
ModeMask
|
Mask.
|
ModePrivateFlag1
|
Private
.
|
ModePrivateFlag2
|
Private
.
|
ModePrivateFlag3
|
Private
.
|
ModePrivateFlag4
|
Private
.
|
ModePrivateFlag5
|
Private
.
|
ModePrivateFlag6
|
Private
.
|
ModePrivateFlag7
|
Private
.
|
◆
anonymous enum
Enumerator
|
OperationSuccessful
|
Operation successful.
|
RenameNotPermitted
|
Rename not permitted.
0x80000001
.
|
MoveNotPermitted
|
Move not permitted.
0x80000002
.
|
CopyNotPermitted
|
Copy not permitted.
0x80000004
.
|
DeleteNotPermitted
|
Delete not permitted.
0x80000008
.
|
NewFolderNotPermitted
|
New folder not permitted.
0x80000010
.
|
RenameError
|
Rename error.
0x80000100
.
|
MoveError
|
Move error.
0x80000200
.
|
CopyError
|
Copy error.
0x80000400
.
|
DeleteError
|
Delete error.
0x80000800
.
|
UnsupportedNodeType
|
Unsupported node type.
0xa0000000L
.
|
UserCancelled
|
User canceled.
0xc0000000L
|
构造函数 & 析构函数文档编制
◆
SDKBrowserContentNodeInfo()
Constructor.
-
参数
-
[in]
|
plugin_id
|
The ID of the plugin that has created the node info.
|
◆
~SDKBrowserContentNodeInfo()
A dummy destructor to make the compiler happy.
成员函数文档编制
◆
GetNode()
Retrieves the corresponding node.
-
返回
-
The node corresponding to this info.
◆
Init()
virtual
Bool
Init
|
(
|
void *
|
node
|
)
|
|
|
virtual
|
Called by the browser with pointer to the corresponding node.
-
参数
-
[in]
|
node
|
Pointer to the node.
|
-
返回
-
true
if successful, otherwise
false
.
◆
Free()
virtual void Free
|
(
|
void
|
|
)
|
|
|
virtual
|
Called by the browser before the node is deleted (overload this to dispose of the
SDKBrowserContentNodeInfo
at a later time).
◆
GetTypeID()
virtual
Int32
GetTypeID
|
(
|
void
|
|
)
|
|
|
pure virtual
|
Called to retrieve the type of content node.
-
返回
-
The content node type ID. See
SDKBrowserNodeTypeID
.
◆
GetPlugin()
Called to retrieve a plugin that can deal with the file.
-
参数
-
-
返回
-
A plugin that can deal with the file of the node.
◆
GetName()
virtual
String
GetName
|
(
|
void
|
|
)
|
|
|
pure virtual
|
Called to retrieve the name of the content node (used in the UI).
-
返回
-
The name of the content node.
◆
GetTypeName()
Called to retrieve the type name of the content node.
-
参数
-
[in]
|
mode
|
The mode. See
SDKBrowserItemType
.
|
-
返回
-
The type name.
◆
GetNodeURL()
Called to retrieve the URL of the content node (this is the file name if the node represents a file or folder in the file system).
If there are multiple objects in a file (e.g. presets) the return value should reflect the index.
-
参数
-
[out]
|
url
|
Assign the URL.
|
[in]
|
flags
|
The flags.
|
-
返回
-
The index, if there are multiple objects.
◆
GetNodeTime()
Called to retrieve the creation and last modification time of a node (this will usually be the file times).
For a directory the modification time will usually be the time when a file has been added or removed.
-
参数
-
[in]
|
mode
|
The mode:
GE_FILETIME
|
[out]
|
out
|
Assign the time.
|
-
返回
-
true
if successful, otherwise
false
.
◆
GetNodeFlags()
virtual
UInt32
GetNodeFlags
|
(
|
Int64
*
|
out_size
=
nullptr
|
)
|
|
|
pure virtual
|
Called to retrieve some node flags.
-
参数
-
[in]
|
out_size
|
Assign the size of the output.
|
-
返回
-
The node flags. See
SDKBrowserNodeFlags
.
◆
GetIcon()
Called to retrieve the icon for this kind of file.
-
参数
-
[in]
|
flags
|
The flags. See
SDKBrowserIcon
.
|
[in]
|
pref_wh
|
The preferred width/height of the icon.
|
-
返回
-
The browser icon for the node. The caller owns the returned icon and has to call
SDKBrowserIcon::Free()
to free it.
◆
UpdateDirectory()
virtual
Int32
UpdateDirectory
|
(
|
void
|
|
)
|
|
|
pure virtual
|
Called before GetDown() is used to search for children (mainly for file system based trees).
-
返回
-
Not used.
◆
PrivateCall()
Hook for private calls. The
plugin_id
and
node_type
parameters should be used to validate the call, so that if a call is made to the wrong node it will do nothing.
-
参数
-
[in]
|
plugin_id
|
Must be the same as
GetPlugin()->GetPluginID()
.
|
[in]
|
node_type
|
Must be the same as
GetTypeID()
.
|
[in]
|
selector
|
The private method index.
|
[in]
|
data
|
The private data.
|
-
返回
-
NOTOK
if not successful.
◆
Rename()
Called to rename the node.
-
参数
-
-
返回
-
The result. See
SDKBrowserOperationResult
.
◆
NewFolder()
Called to create a new folder.
-
参数
-
-
返回
-
The result. See
SDKBrowserOperationResult
.
◆
MoveFrom()
Called to move nodes (the node will be the new parent).
-
参数
-
[in]
|
new_child
|
The new child.
|
[in]
|
mode
|
The mode. See
SDKBrowserOperation
.
|
[in]
|
callback
|
The callback, e.g. for progress report. Only called for
PrepareOperation
and
PerformOperation
模式。
|
[in]
|
private_data
|
Private data for the callback.
|
[in]
|
thread
|
The thread.
|
-
返回
-
The result. See
SDKBrowserOperationResult
.
◆
CopyFrom()
Called to copy nodes (the node will be the new parent).
-
参数
-
[in]
|
new_child
|
The new child.
|
[in]
|
mode
|
The mode. See
SDKBrowserOperation
.
|
[in]
|
rename
|
Pointer to a string if
new_child
has to be renamed to avoid a name conflict. Can be
nullptr
.
|
[in]
|
callback
|
The callback, e.g. for progress report. Only called for
PrepareOperation
and
PerformOperation
模式。
|
[in]
|
private_data
|
Private data for the callback.
|
[in]
|
thread
|
The thread.
|
-
返回
-
The result. See
SDKBrowserOperationResult
.
◆
Delete()
Called to delete the node and its children.
-
参数
-
[in]
|
mode
|
The mode. See
SDKBrowserOperation
.
|
[in]
|
callback
|
The callback, e.g. for progress report. Only called for
PrepareOperation
and
PerformOperation
模式。
|
[in]
|
private_data
|
Private data for the callback.
|
[in]
|
thread
|
The thread.
|
-
返回
-
The result. See
SDKBrowserOperationResult
.
Friends And Related Function Documentation
◆
SDKBrowserContentNode
◆
SDKNode
friend class SDKNode
|
friend
|
Member Data Documentation
◆
plugin_id
◆
node