Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions
nsMsgRDFUtils.h File Reference
#include "rdf.h"
#include "nsIRDFResource.h"
#include "nsIRDFNode.h"
#include "nsIRDFDataSource.h"
#include "nsIRDFService.h"
#include "nsString.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _nsMsgRDFNotification

Defines

#define NC_RDF_CHILD   NC_NAMESPACE_URI "child"
#define NC_RDF_NAME   NC_NAMESPACE_URI "Name"
#define NC_RDF_OPEN   NC_NAMESPACE_URI "open"
#define NC_RDF_FOLDERTREENAME   NC_NAMESPACE_URI "FolderTreeName"
#define NC_RDF_FOLDERTREESIMPLENAME   NC_NAMESPACE_URI "FolderTreeSimpleName"
#define NC_RDF_FOLDER   NC_NAMESPACE_URI "Folder"
#define NC_RDF_SPECIALFOLDER   NC_NAMESPACE_URI "SpecialFolder"
#define NC_RDF_SERVERTYPE   NC_NAMESPACE_URI "ServerType"
#define NC_RDF_REDIRECTORTYPE   NC_NAMESPACE_URI "RedirectorType"
#define NC_RDF_CANCREATEFOLDERSONSERVER   NC_NAMESPACE_URI "CanCreateFoldersOnServer"
#define NC_RDF_CANFILEMESSAGESONSERVER   NC_NAMESPACE_URI "CanFileMessagesOnServer"
#define NC_RDF_ISSERVER   NC_NAMESPACE_URI "IsServer"
#define NC_RDF_ISSECURE   NC_NAMESPACE_URI "IsSecure"
#define NC_RDF_CANSUBSCRIBE   NC_NAMESPACE_URI "CanSubscribe"
#define NC_RDF_SUPPORTSOFFLINE   NC_NAMESPACE_URI "SupportsOffline"
#define NC_RDF_CANFILEMESSAGES   NC_NAMESPACE_URI "CanFileMessages"
#define NC_RDF_CANCREATESUBFOLDERS   NC_NAMESPACE_URI "CanCreateSubfolders"
#define NC_RDF_CANRENAME   NC_NAMESPACE_URI "CanRename"
#define NC_RDF_CANCOMPACT   NC_NAMESPACE_URI "CanCompact"
#define NC_RDF_TOTALMESSAGES   NC_NAMESPACE_URI "TotalMessages"
#define NC_RDF_TOTALUNREADMESSAGES   NC_NAMESPACE_URI "TotalUnreadMessages"
#define NC_RDF_FOLDERSIZE   NC_NAMESPACE_URI "FolderSize"
#define NC_RDF_CHARSET   NC_NAMESPACE_URI "Charset"
#define NC_RDF_BIFFSTATE   NC_NAMESPACE_URI "BiffState"
#define NC_RDF_HASUNREADMESSAGES   NC_NAMESPACE_URI "HasUnreadMessages"
#define NC_RDF_SUBFOLDERSHAVEUNREADMESSAGES   NC_NAMESPACE_URI "SubfoldersHaveUnreadMessages"
#define NC_RDF_NOSELECT   NC_NAMESPACE_URI "NoSelect"
#define NC_RDF_VIRTUALFOLDER   NC_NAMESPACE_URI "Virtual"
#define NC_RDF_INVFEDITSEARCHSCOPE   NC_NAMESPACE_URI "InVFEditSearchScope"
#define NC_RDF_IMAPSHARED   NC_NAMESPACE_URI "ImapShared"
#define NC_RDF_NEWMESSAGES   NC_NAMESPACE_URI "NewMessages"
#define NC_RDF_SYNCHRONIZE   NC_NAMESPACE_URI "Synchronize"
#define NC_RDF_SYNCDISABLED   NC_NAMESPACE_URI "SyncDisabled"
#define NC_RDF_KEY   NC_NAMESPACE_URI "Key"
#define NC_RDF_CANSEARCHMESSAGES   NC_NAMESPACE_URI "CanSearchMessages"
#define NC_RDF_ISDEFERRED   NC_NAMESPACE_URI "IsDeferred"
#define NC_RDF_SUBJECT_COLLATION_SORT   NC_NAMESPACE_URI "Subject?collation=true"
#define NC_RDF_SENDER_COLLATION_SORT   NC_NAMESPACE_URI "Sender?collation=true"
#define NC_RDF_RECIPIENT_COLLATION_SORT   NC_NAMESPACE_URI "Recipient?collation=true"
#define NC_RDF_ORDERRECEIVED_SORT   NC_NAMESPACE_URI "OrderReceived?sort=true"
#define NC_RDF_PRIORITY_SORT   NC_NAMESPACE_URI "Priority?sort=true"
#define NC_RDF_DATE_SORT   NC_NAMESPACE_URI "Date?sort=true"
#define NC_RDF_SIZE_SORT   NC_NAMESPACE_URI "Size?sort=true"
#define NC_RDF_ISUNREAD_SORT   NC_NAMESPACE_URI "IsUnread?sort=true"
#define NC_RDF_FLAGGED_SORT   NC_NAMESPACE_URI "Flagged?sort=true"
#define NC_RDF_NAME_SORT   NC_NAMESPACE_URI "Name?sort=true"
#define NC_RDF_FOLDERTREENAME_SORT   NC_NAMESPACE_URI "FolderTreeName?sort=true"
#define NC_RDF_DELETE   NC_NAMESPACE_URI "Delete"
#define NC_RDF_REALLY_DELETE   NC_NAMESPACE_URI "ReallyDelete"
#define NC_RDF_NEWFOLDER   NC_NAMESPACE_URI "NewFolder"
#define NC_RDF_GETNEWMESSAGES   NC_NAMESPACE_URI "GetNewMessages"
#define NC_RDF_COPY   NC_NAMESPACE_URI "Copy"
#define NC_RDF_MOVE   NC_NAMESPACE_URI "Move"
#define NC_RDF_COPYFOLDER   NC_NAMESPACE_URI "CopyFolder"
#define NC_RDF_MOVEFOLDER   NC_NAMESPACE_URI "MoveFolder"
#define NC_RDF_MARKALLMESSAGESREAD   NC_NAMESPACE_URI "MarkAllMessagesRead"
#define NC_RDF_COMPACT   NC_NAMESPACE_URI "Compact"
#define NC_RDF_COMPACTALL   NC_NAMESPACE_URI "CompactAll"
#define NC_RDF_RENAME   NC_NAMESPACE_URI "Rename"
#define NC_RDF_EMPTYTRASH   NC_NAMESPACE_URI "EmptyTrash"
#define NC_RDF_DOWNLOADFLAGGED   NC_NAMESPACE_URI "DownloadFlaggedMessages"
#define NC_RDF_DOWNLOADSELECTED   NC_NAMESPACE_URI "DownloadSelectedMessages"

Typedefs

typedef struct
_nsMsgRDFNotification 
nsMsgRDFNotification

Functions

nsresult createNode (const PRUnichar *str, nsIRDFNode **, nsIRDFService *rdfService)
nsresult createIntNode (PRInt32 value, nsIRDFNode **node, nsIRDFService *rdfService)
nsresult createBlobNode (PRUint8 *value, PRUint32 &length, nsIRDFNode **node, nsIRDFService *rdfService)
nsresult GetTargetHasAssertion (nsIRDFDataSource *dataSource, nsIRDFResource *folderResource, nsIRDFResource *property, PRBool tv, nsIRDFNode *target, PRBool *hasAssertion)

Class Documentation

struct _nsMsgRDFNotification

Definition at line 48 of file nsMsgRDFUtils.h.

Collaboration diagram for _nsMsgRDFNotification:
Class Members
nsIRDFDataSource * datasource
nsIRDFNode * newObject
nsIRDFNode * oldObject
nsIRDFResource * property
nsIRDFResource * subject

Define Documentation

Definition at line 81 of file nsMsgRDFUtils.h.

Definition at line 76 of file nsMsgRDFUtils.h.

#define NC_RDF_CANCREATEFOLDERSONSERVER   NC_NAMESPACE_URI "CanCreateFoldersOnServer"

Definition at line 67 of file nsMsgRDFUtils.h.

#define NC_RDF_CANCREATESUBFOLDERS   NC_NAMESPACE_URI "CanCreateSubfolders"

Definition at line 74 of file nsMsgRDFUtils.h.

Definition at line 73 of file nsMsgRDFUtils.h.

#define NC_RDF_CANFILEMESSAGESONSERVER   NC_NAMESPACE_URI "CanFileMessagesOnServer"

Definition at line 68 of file nsMsgRDFUtils.h.

Definition at line 75 of file nsMsgRDFUtils.h.

Definition at line 92 of file nsMsgRDFUtils.h.

Definition at line 71 of file nsMsgRDFUtils.h.

Definition at line 80 of file nsMsgRDFUtils.h.

Definition at line 58 of file nsMsgRDFUtils.h.

Definition at line 119 of file nsMsgRDFUtils.h.

Definition at line 120 of file nsMsgRDFUtils.h.

Definition at line 114 of file nsMsgRDFUtils.h.

Definition at line 116 of file nsMsgRDFUtils.h.

Definition at line 101 of file nsMsgRDFUtils.h.

Definition at line 110 of file nsMsgRDFUtils.h.

#define NC_RDF_DOWNLOADFLAGGED   NC_NAMESPACE_URI "DownloadFlaggedMessages"

Definition at line 123 of file nsMsgRDFUtils.h.

#define NC_RDF_DOWNLOADSELECTED   NC_NAMESPACE_URI "DownloadSelectedMessages"

Definition at line 124 of file nsMsgRDFUtils.h.

Definition at line 122 of file nsMsgRDFUtils.h.

Definition at line 104 of file nsMsgRDFUtils.h.

Definition at line 63 of file nsMsgRDFUtils.h.

Definition at line 79 of file nsMsgRDFUtils.h.

Definition at line 61 of file nsMsgRDFUtils.h.

Definition at line 107 of file nsMsgRDFUtils.h.

#define NC_RDF_FOLDERTREESIMPLENAME   NC_NAMESPACE_URI "FolderTreeSimpleName"

Definition at line 62 of file nsMsgRDFUtils.h.

Definition at line 113 of file nsMsgRDFUtils.h.

Definition at line 82 of file nsMsgRDFUtils.h.

Definition at line 87 of file nsMsgRDFUtils.h.

#define NC_RDF_INVFEDITSEARCHSCOPE   NC_NAMESPACE_URI "InVFEditSearchScope"

Definition at line 86 of file nsMsgRDFUtils.h.

Definition at line 93 of file nsMsgRDFUtils.h.

Definition at line 70 of file nsMsgRDFUtils.h.

Definition at line 69 of file nsMsgRDFUtils.h.

Definition at line 103 of file nsMsgRDFUtils.h.

Definition at line 91 of file nsMsgRDFUtils.h.

#define NC_RDF_MARKALLMESSAGESREAD   NC_NAMESPACE_URI "MarkAllMessagesRead"

Definition at line 118 of file nsMsgRDFUtils.h.

Definition at line 115 of file nsMsgRDFUtils.h.

Definition at line 117 of file nsMsgRDFUtils.h.

Definition at line 59 of file nsMsgRDFUtils.h.

Definition at line 106 of file nsMsgRDFUtils.h.

Definition at line 112 of file nsMsgRDFUtils.h.

Definition at line 88 of file nsMsgRDFUtils.h.

Definition at line 84 of file nsMsgRDFUtils.h.

Definition at line 60 of file nsMsgRDFUtils.h.

Definition at line 99 of file nsMsgRDFUtils.h.

Definition at line 100 of file nsMsgRDFUtils.h.

Definition at line 111 of file nsMsgRDFUtils.h.

Definition at line 98 of file nsMsgRDFUtils.h.

Definition at line 66 of file nsMsgRDFUtils.h.

Definition at line 121 of file nsMsgRDFUtils.h.

Definition at line 97 of file nsMsgRDFUtils.h.

Definition at line 65 of file nsMsgRDFUtils.h.

Definition at line 102 of file nsMsgRDFUtils.h.

Definition at line 64 of file nsMsgRDFUtils.h.

#define NC_RDF_SUBFOLDERSHAVEUNREADMESSAGES   NC_NAMESPACE_URI "SubfoldersHaveUnreadMessages"

Definition at line 83 of file nsMsgRDFUtils.h.

Definition at line 96 of file nsMsgRDFUtils.h.

Definition at line 72 of file nsMsgRDFUtils.h.

Definition at line 90 of file nsMsgRDFUtils.h.

Definition at line 89 of file nsMsgRDFUtils.h.

Definition at line 77 of file nsMsgRDFUtils.h.

#define NC_RDF_TOTALUNREADMESSAGES   NC_NAMESPACE_URI "TotalUnreadMessages"

Definition at line 78 of file nsMsgRDFUtils.h.

Definition at line 85 of file nsMsgRDFUtils.h.


Typedef Documentation


Function Documentation

nsresult createBlobNode ( PRUint8 value,
PRUint32 length,
nsIRDFNode **  node,
nsIRDFService rdfService 
)

Definition at line 80 of file nsMsgRDFUtils.cpp.

{
  NS_ENSURE_ARG_POINTER(node);
  NS_ENSURE_ARG_POINTER(rdfService);
  
  *node = nsnull;
  nsCOMPtr<nsIRDFBlob> blob;
  nsresult rv = rdfService->GetBlobLiteral(value, length, getter_AddRefs(blob));
  NS_ENSURE_SUCCESS(rv,rv);
  NS_IF_ADDREF(*node = blob);
  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult createIntNode ( PRInt32  value,
nsIRDFNode **  node,
nsIRDFService rdfService 
)

Definition at line 66 of file nsMsgRDFUtils.cpp.

{
  *node = nsnull;
  nsresult rv; 
  if (!rdfService) return NS_ERROR_NULL_POINTER;  
  nsCOMPtr<nsIRDFInt> num;
  rv = rdfService->GetIntLiteral(value, getter_AddRefs(num));
  if(NS_SUCCEEDED(rv)) {
    *node = num;
    NS_IF_ADDREF(*node);
  }
  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult createNode ( const PRUnichar str,
nsIRDFNode **  ,
nsIRDFService rdfService 
)

Definition at line 44 of file nsMsgRDFUtils.cpp.

{
  nsresult rv;
  nsCOMPtr<nsIRDFLiteral> value;

  NS_ASSERTION(rdfService, "rdfService is null");
  if (!rdfService) return NS_OK;

  if (str) {
    rv = rdfService->GetLiteral(str, getter_AddRefs(value));
  } 
  else {
    rv = rdfService->GetLiteral(EmptyString().get(), getter_AddRefs(value));
  }

  if (NS_SUCCEEDED(rv)) {
    *node = value;
    NS_IF_ADDREF(*node);
  }
  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult GetTargetHasAssertion ( nsIRDFDataSource dataSource,
nsIRDFResource folderResource,
nsIRDFResource property,
PRBool  tv,
nsIRDFNode target,
PRBool hasAssertion 
)

Definition at line 93 of file nsMsgRDFUtils.cpp.

{
  NS_ENSURE_ARG_POINTER(hasAssertion);
  
  nsCOMPtr<nsIRDFNode> currentTarget;
  
  nsresult rv = dataSource->GetTarget(folderResource, property,tv, getter_AddRefs(currentTarget));
  if(NS_SUCCEEDED(rv))
  {
    nsCOMPtr<nsIRDFLiteral> value1(do_QueryInterface(target));
    nsCOMPtr<nsIRDFLiteral> value2(do_QueryInterface(currentTarget));
    if(value1 && value2)
      //If the two values are equal then it has this assertion
      *hasAssertion = (value1 == value2);
  }
  else
    rv = NS_NOINTERFACE;
  
  return rv;
  
}

Here is the call graph for this function:

Here is the caller graph for this function: